Questions tagged [searching]

The tag has no usage guidance.

3
votes
3answers
89 views

Find element in a list matching a pattern (using wildcards)

Somehow, I did not manage to find anything related to that. Suppose, in my Global list of variables, I would like to make a search such that I obtain all the ...
3
votes
3answers
71 views

Subsequence Search

I need to parse some xml code. I need to extract some values withing pattern elements. I made an example of my trouble. Here is some complicated xml list: ...
3
votes
3answers
107 views

Find non-case sensitive string in a mixed list of elements?

Consider an example list with mixed element types, e.g.: list = { 1.234 , a[2] , {"Abc" , 4/5} , "acb" }; I would like to have a function that finds the position ...
2
votes
0answers
40 views

Match an expression that has a descendant pattern

I have a complicated expression in which I have another expression p which, when it’s present, I want to match the outer expression and all of its children. I was hoping for something like ...
2
votes
0answers
50 views

Is there a way to cancel a search in Mathematica?

Is there a way to cancel a word search in Mathematica initiated via the Find and Replace menu?
3
votes
0answers
78 views

Approximate Nearest Neighbors in Mathematica?

Is there any support for Approximate Nearest Neighbors (ANN) in Mathematica or third-party packages? I'm looking for a good implementation of locality sensitive hashing for applications where ...
5
votes
4answers
344 views

Find permutation index

Firstly I wanted to find all the non-negative integer solutions for the following equation given the value of $k_{max}$ $$ k_1 +k_2 +k_3+k_4 = k_{max} $$ For this I use the following code:- ...
0
votes
1answer
28 views

Problem using Position when using a variable [closed]

So, I tried to use Position to get the Position of the 90% Maximum of a Photodiode Signal. The code works when i directly use the solution of the .9*Max[...] solution, but I want to have it with a ...
5
votes
1answer
64 views

Filling and transferring water between containers to obtain a desired volume

A classic class of math puzzles involves two irregular containers, $A$ and $B$, having known volumes $V_A$ and $V_B$ and an infinite source of water (from a spigot, say). You can fill either ...
0
votes
1answer
214 views

Using the binary search algorithm in a sorted grid

I want to get a mathematica code for binary search algorithm applied to a sorted grid containing integers. For example, given f[k_,x_]= x^2 + k x + k - 2 where <...
5
votes
1answer
72 views

How to speed up a text search widget?

I have an InputField that searches a predefined list for matching strings and displays them in a TextGrid. But when the list is ...
7
votes
1answer
130 views

How to cache results of WebImageSearch?

Every call to WebImageSearch costs money (wolfram service credits), thus, I would like to page through results without having to redownload them. Given the ...
0
votes
2answers
43 views

Looking for specific data in .txt file

I've the following code: Import["test.txt"] And it gives me: 1,10 2,20 3,30 4,40 5,50 6,60 7,70 8,80 9,90 10,100 11,110 12,120 13,130 14,140 15,...
0
votes
1answer
30 views

Searching in a .txt file for a specific time

I've the following code: Import["hoi1.txt"] And it gives me: "(time,voltage,current,power) (1,10,5,10*5) (2,20,6,20*6) (3,30,7,30*7) (4,40,8,40*8) (...
4
votes
4answers
169 views

How can one efficiently find the (x,y) values of the rectangles that enclose a chosen % of nonrandom data points in mathematica?

A half hour of searching for answers did not give useful results. This is typical data: I need to find the (x,y) values of at least 6 rectangles with one corner at (0,0) and the opposite corner at (...
3
votes
0answers
63 views

Extracting names (surname & family name) from unstructured text files

This question is about finding names of people in a text without knowing these people. There are some rules we can use to detecting names in a text A name consist always of two or more words (...
6
votes
4answers
277 views

Searching for an unordered triple in a list of triples

I have a list of triples which looks like this T = {{7, 1, 2}, {7, 2, 3}, {7, 3, 8}, {7, 1, 6}}; (I have suppressed a few triples for clarity. My real list is ...
2
votes
2answers
106 views

Efficient Search for reverse element in List of Lists

I have a big list AllCycles with contains lists of non-repeating integers (and the first element is always the smallest). I want a function ...
10
votes
1answer
313 views

How can I implement my own documentation search function?

The current documentation search doesn't allow for very sophisticate searching, can I write my own function to search through the docs?
2
votes
0answers
83 views

dynamic binary search

Suppose I have a time series of values $v_1, \dotsc, v_n, \dots,$ (think of the data as being generated by repeated function calls, like a Python generator, or being captured in real time) and I want ...
3
votes
2answers
236 views

Obtaining the position in a list where the i^th element is bigger than the (i+1)^th element

My question is very simple but I am not able to find the optimal solution. What I am trying to do is to have a function that give me the position in a list at which the value at position ...
3
votes
0answers
54 views

How to find where in a large expression Power::infy is generated?

Consider the following expression: ...
2
votes
2answers
102 views

Memoization and finding already calculated DownValue

The problem of plotting an expensive function discussed in this question caught my attention. As an exercies I tried to solve it using memoization as follows ...
1
vote
0answers
59 views

What can we do with the Dump contexts? [closed]

So we know from here what the *Dump contexts signify and here Rojo found a very useful goody that involves them: ...
0
votes
1answer
71 views

The nearest object from the array of objects

I need to find the most similar to desired object from the array of objects. In this case ...
3
votes
0answers
50 views

Is there a way to search for a WolframLanguage pattern in Notebook? [duplicate]

Mathematica Notebook has a Search&Replace dialog, which allows to look for particular expressions. But I'd like to be able to find instances of code corresponding to a particular pattern. E.g. if ...
1
vote
0answers
57 views

Alternative Methods of Using Cumulative Density Functions To Obtain Probabilities

I have a CDF that is generated from the subtraction of two arrays as part of a minimization procedure. A consequence is that events in the simulation can cause the subtracted total to be less than 0: ...
5
votes
3answers
644 views

Working with deep lists

I want to store parameters value such that the function that depends on those parameters. For example, let's say I have a function that depends on three arguments: f(x;a,b), where a and b are ...
9
votes
0answers
129 views

Is it possible to search the web by image from Mathematica?

Is it possible to perform a web search based on an image input? There are several services that provide this: Google, Bing, TinEye, and maybe others. I am not sure which can be accessed ...
7
votes
2answers
142 views

Display Documentation From Function

I would like a documentation function that works like that following. doc["search terms"] and it displays the list of search terms. And then ...
11
votes
3answers
255 views

Basic Search Functionality

Let say I have three blocks of text like the following. {"first block of text with random content","different block of text","1 2 3 4"} Now let's say I want to ...
1
vote
0answers
61 views

Improved Documentation Search By Actual Content

Now by default Mathematica documentation searches keywords section in the Options version of the notebook and the actual text of the notebook. For example here is a snippet from ...
10
votes
2answers
322 views

Position and string patterns

I am trying to get Position work with patterns. I have the following code: ...
9
votes
4answers
717 views

Searching a phrase in all *.nb files

I have so many *.nb files in a folder. In one of them I have written a phrase, unfortunately I cannot remember that file. I am searching about it and the file in ...
6
votes
1answer
176 views

Using Mathematica to find an alternative continued fraction for $\zeta(5)$

Given the Riemann zeta function $\zeta(n)$. I. $x=\zeta(3)$ Using Euler's continued fraction formula, we can form $\zeta(3)$'s cfrac as, $$Ax+B = \cfrac{1}{v_1 - \cfrac{1^6}{v_2 - \cfrac{2^6}{...
6
votes
2answers
148 views

How to find alignments of interlocking shapes?

I'm searching for the ways to align interlocking shapes, that is, finding the locations and rotations that maximize the arc length at which they touch. For simplicity, I'm assuming 'shapes' are one ...
4
votes
1answer
73 views

Why does documentation search fail on substrings?

For example many times I have to type the full string exactly which defeats the point of a search, so perhaps this is a bug?
0
votes
0answers
153 views

Replacing parts of a complicated expression with shorthand symbols

I have a list, each element of which contains a different complicated expression. Here is a simplified example of the first three entries of the list, displayed one above the other: $\frac{Ey \ \mu \ ...
3
votes
1answer
265 views

WolframConnector - getting credentials for GoogleCustomSearch

I need to fill in the information for the WolframConnector in the panel shown below which is activated by running the command: ...
4
votes
1answer
279 views

For loop to perform a shooting search in NDSolve

First comes the disclosure: I am very new to Mathematica and not so much a numerical guy in general. I am having a hard time using the for loop routine in Mathematica the correct way as well as ...
6
votes
1answer
125 views

TextSearch Function

I am trying to use the new text search function to help me look through a directory of files for string that I chose. Essentially I've got a large list of notebooks and don't want to manually look ...
6
votes
1answer
143 views

Searching for literal strings with TextSearch

The documentation indicates that TextSearch can be used to look for a "literal string" inside documents, but it appears Mathematica may be applying a regex-style ...
8
votes
3answers
2k views

Finding all of the words containing certain letters

Is there a fast method to find all of the words containing the letters: {a, e, i, o, u, y}? I created an algorithm, but it takes more than 11 seconds to find all of ...
1
vote
1answer
94 views

Want to display a animation necklace when updating a list of suggestions from an inputfield search

I have an InputField search that provides search suggestions, but I want an animation necklace to be displayed while the search is 'busy'. I would also like this to be done using Dynamic rather than ...
0
votes
2answers
67 views

How do I use DictionaryLookup to exclude words with certain phrases?

I'm looking to use DictionaryLookup to search the English dictionary for words that don't contain certain strings. For example, I want to exclude ...
4
votes
2answers
246 views

Limit FindMinimumCostFlow function to one vertex per path

I want find a set of paths through a graph that maximise flow and minimise cost set on each Edge. However, I have an additional constraint where each Vertex can only be visited once. Mathematica has ...
1
vote
2answers
290 views

Is there a way to search for Arithmetic Progressions in a list?

If you have a list of integers is there a way of searching that list to see if there is a trend of Ax+B in the list? Not using all of the numbers, just seeing what trends like that are embedded in a ...
2
votes
0answers
104 views

Retrieving a Portion of Webpage Code using URLFetch

The URLFetch command is very useful for pulling the entire html source of a given webpage, however, if one wanted to speed up the process, by only requesting a ...
1
vote
1answer
82 views

Searching if a directory exists within a folder

I hope this question is not a duplicate, but I could not find any other question which answered my specific question, which is: I have the following folder structure (just an example): samefolder/...
10
votes
1answer
1k views

Is there a built-in function to do binary search?

Is there a built-in function to do binary search? Say, given a list (sorted) and a number, find the position which keeps the listed sorted when the number is inserted. I know that ...