Questions tagged [searching]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12 votes
5 answers

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 ...
  • 4,657
15 votes
3 answers

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 ...
  • 643
16 votes
2 answers

How to find a specific error message?

Is there a way to find an existing error message in the System` context, that is used for a certain case? I want to include a message in a custom function that ...
8 votes
3 answers

Find the position of a string element, knowing only part of the string

I have a list, e.g.: list = {1, 2, 3, "Element 1", 4, 5, "Element 2", "Something else 1", "etcetera"} Now, I want all elements starting with ...
22 votes
2 answers

Determine whether some expression contains a given symbol

Given a symbol t and an expression expr, how can I determine whether or not the symbol t ...
  • 1,829
37 votes
2 answers

Documentation searches hang frequently: Anyone else dealing with this?

I've been struggling with a number of hangs, dynamic timeouts, and outright crashes when using the search/documentation center in version 9. I've tried uninstalling/reinstalling and clearing ...
25 votes
1 answer

Strategies for solving problems involving searches

As an example of a search-oriented problem, consider finding all constrained $n$-colorings of a graph. An "$n$-coloring" associates one of $n \ge 1$ colors to each vertex in such a way that no edge ...
  • 20.3k
21 votes
1 answer

NotebookFind and String Pattern Expressions

Is there a way that NotebookFind can be used to match string pattern expressions rather than just strings? The documentation for ...
10 votes
1 answer

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?
  • 45.8k
12 votes
2 answers

Efficiently searching a list for the position of the closest number to a specified number

Searching by closest and position I wasn't able to find an answer—but found Nearest by guessing. Nearest, however, returns ...
10 votes
3 answers

Extracting values with multiple keys

I want to extract sorted data from a huge database based upon two (or more) keys in a very timely manner. Here is a reproducible toy example for two keys only: ...
  • 34.6k
5 votes
4 answers

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:- ...
  • 3,564
8 votes
2 answers

Finding all sets of elements with two common elements in a large dataset

I have a very large network of atoms ($\approx 10^6$ atoms) with fixed positions that resemble a cellular structure: I have two files including: fixed locations of each atom set of points which ...
  • 1,619
9 votes
2 answers

Find file names in directory

I am trying to find the list of any file in any directory of a given name (by in the directory, I mean directly in the directory, so in a directory which is in the directory would not count). For the ...
7 votes
2 answers

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 ...
  • 30.8k
6 votes
2 answers

Interactive grid

I would like to create an interactive grid, whereby one number from a grid is selected by the cursor ("3" in the example below), and all other numbers in the grid are highlighted that are related to ...
  • 8,005
4 votes
1 answer

Searching Notebooks for String Patterns using Workbench v2

The Workbench webpage describing new features in version 2 lists the ability to "Search notebook documents with the Mathematica pattern search utility" under the heading Mathematica Front End ...
5 votes
3 answers

Determine if a variable appears in an expression or not?

Consider an arbitrary expression expr. This expression may contain arbitrary data, like integers, variables, implicit functions etc. Now, I would like to determine ...
  • 11.7k
2 votes
1 answer

Search for squares

Could anyone please help me find $a\left(x,y,z\right)$, $b_{i}\left(x,y,x\right),$$c_{i}\left(x,y,z\right)$ and $d\left(x,y,z\right)$ that are sums of squares of polynomials or rational functions such ...
  • 21
0 votes
0 answers

How to search exact product title with ServiceExecute

I am trying to find the exact product title having phrase "HEPA filter bags" on "" but it doesn't return the correct result. ...
  • 125
0 votes
1 answer

Searching across multiple notebooks for given list of functions / symbols

Is there a method to search across multiple notebooks for each in a given list of function or symbol name? The input should be a list of function or defined symbols, and the output would be an ...
  • 14.9k