Questions tagged [searching]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

How to search text for a specific word? [closed]

I have a list of text where each position contains a sublist with a length of 12 elements. I'm trying to search for a word can be appears in the first position of each sublist. The desired output is ...
2 votes
0 answers
27 views

Notebook search with snippets programmatically

The normal "find" function in large notebooks hangs. I'd like to implement in-notebook find programmatically with displayed snippets of the results: ...
3 votes
3 answers
221 views

Finding minimum in a list of lists

Imagine I have the following list {{0, {2,3}}, {-1, {5,3}}, {2, {2,6}}, {5, {5,0}}, {0, {1,1}}, {-2, {10,2}}, {3, {4,2}}}; I want to pick the element in the list ...
10 votes
7 answers
746 views

How to find the position of the smaller element in the list?

x = {4, 1, 2, 5, 6, 7} y = {1, 2, 4, 5, 6, 9} There are two lists x and y. How to find out these positions of the elements in list x are smaller than those in ...
8 votes
5 answers
424 views

Find sublists in a list by contents, then union them

I want to find two sublists in a list by an element they contain, and then union them, keeping them in the list. I have this code that seems to do the job, but it seems rather clunky. Is there a ...
1 vote
0 answers
77 views

Best way to search for Wolfram Language documentation and answers?

I just found this custom Google search engine I made 8 years ago to search through Wolfram Language Documentation, Mathematica StackExchange, MathGroup, and Wolfram Community. I was surprised to find ...
0 votes
1 answer
86 views

Binary algorithm for finding the range of elements

Consider a sorted list of real numbers listz and some boolean condition condition that involves these numbers: ...
3 votes
1 answer
198 views

How to find a unimodular integer matrix $T$ satisfying $T^\top A T=B$ given symmetric integer matrices $A,B$?

Given two unimodular symmetric integer matrices $A$ and $B$, I asked how to find a unimodular integer $T$ that satisfies this nonlinear relation between $T$ and $A,B$ like this in Mathematica: ...
2 votes
2 answers
131 views

Enter special character in search box

Usually, I just enter special characters with the Esc key and hence am not familiar with their real code in plain text. But this seems troublesome in the search box ...
1 vote
0 answers
57 views

How to search for content in all my Mathematica files, or in the opened ones?

I have one file where I used the package 'ReactionKinetics' but I forgot where. Does Mathematica allow for searches in all Mathematica files, or in the opened ones, like certain editors (Winedt, ...) ...
10 votes
3 answers
1k views

Solving a rotating combination lock puzzle

The following puzzle appears in The House of da Vinci II and I thought it might be interesting to tackle in Mathematica: There are numbers marked on four rotating cylinders. These numbers must add up ...
8 votes
5 answers
2k views

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 ...
5 votes
3 answers
295 views

Solving the Covering Salesman Problem in Mathematica

Say I have a weighted graph ...
1 vote
2 answers
79 views

How do I find the "edge" values/positions in a list?

I have a list of values and am interested in finding the contiguous region above a certain threshold. I have gotten this far,but cannot seem to find the correct way to find the edges. Note: It is not ...
0 votes
0 answers
61 views

What strategy would you adopt for this deep search on a function?

Ok, so I have a problem where I have a function that depends on 9 parameters and a bound condition $$f(x,y,z,w,t,u,v,r,s)<K$$ Now all these variables take discrete values such as: $$x \in \{x_1, ...
6 votes
1 answer
231 views

Documentation Search : google-like (pokygon -> polygon)

If you search for "pokygon" in google.com, then google automatically fix error, and searches for "polygon". Like google.com, if you search for "pokygon" in mathematica (V ...
15 votes
3 answers
2k 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 ...
0 votes
1 answer
164 views

Implementing an optimization algorithm in WL

I am trying to implement the Jaya optimization algorithm (Jaya). This is a flowchart from the Author 's webpage showing the details of the Algorithm. Note that there is a typo in the equation in the ...
1 vote
3 answers
364 views

How to find the nearest string to another string in a mixed array

I am trying to find which string is nearest to another string in an array of numbers and strings. For example, say I have an array that is as follows ...
12 votes
5 answers
2k 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 ...
18 votes
1 answer
379 views

Intelligent text search on large directories of notebooks?

I have a (deeply nested) directory containing 10s of thousands of wolfram files (mostly notebooks (nbs), but also scripts (.wls), packages (.m, .q wl), my and wxf data) and many subfolders each with a ...
2 votes
2 answers
70 views

How to find the primitive Heron triangles with three rational angle-bisectors by MMA?

I'd like to find the primitive Heron triangles with three rational angle-bisectors. In a Chinese book, I saw these primitive Heron triangles with three sides no longer than 1000, but I'm not sure if ...
11 votes
3 answers
223 views

Faster searching for subsets with pairwise conditions

I am looking for a faster way of finding large subsets of lists that obey pairwise conditions. In particular, I'm looking for a large (over 10k) set of quaternary words (i.e. ordered lists) of length ...
1 vote
2 answers
179 views

How to search a directory of nb files for a string?

I would like to find a particular string in a set of nb files in a directory but am having problems interpreting the results of my code. Here's a simple example: In directory d:\mathematica, I have ...
0 votes
0 answers
53 views

How to search exact product title with ServiceExecute

I am trying to find the exact product title having phrase "HEPA filter bags" on "amazon.com" but it doesn't return the correct result. ...
3 votes
1 answer
38 views

Position doesn't work for custom symbol within package

In a notebook, I can easily search an expression for a custom symbol. In[237]:= Position[{mySym, 1, 2}, mySym] Out[237]= {{1}} However, if I write a function and ...
1 vote
1 answer
148 views

Pattern Matching in 2-dimensional lists

How would I search for all the elements in a nested list which contain values at specific index? For example, I want to search for and return all the elements in a (n,2) list which begin with a 3 ({3, ...
2 votes
2 answers
114 views

Finding Mnemonics for expressions with lots of indices

One of the equations I work with in my research are the pentagon equations: ...
0 votes
1 answer
225 views

Import structure from Matlab into Mathematica 12 and nested lookup

I use Matlab and generate data that I save in a structure in a MAT file. I want the results to be loaded into Mathematica, as several analysis and plots are best when done in the latter than in the ...
2 votes
3 answers
219 views

Cases do not pick up Sqrt?

I'm trying to understand how Cases work in Mathematica, and I'm a bit curios why i't wont pick up the Sqrt function? Consider the following expressions ...
0 votes
1 answer
33 views

Search for terms contatining error functions

question might have an answer in this post (Efficient Search for specific Terms in symbolic Expression) but i don't understand how to convert it to my specific case Through some definite integrals I ...
12 votes
1 answer
393 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}{...
0 votes
1 answer
80 views

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 ...
4 votes
1 answer
324 views

Find words in a messed up table [duplicate]

This table with a caption that said "First three words you see will come to you in 2021" inspired me to do some digging: Imagine that we have a table with randomly filled letters. How can ...
6 votes
4 answers
463 views

How to search within notebooks on Windows 10?

I have a lot of notebooks scattered in my downloads, documents and desktop folder. I have all the required locations on Windows indexing options but if I look at Advanced Options and File Types and nb ...
2 votes
1 answer
109 views

How to search for special `ResourceFunctions`

In Mathematica there exist several very useful Resource functions , for example ResourceFunction["MeanCurvature"] and ...
2 votes
1 answer
312 views

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 ...
3 votes
2 answers
221 views

Find position of sublists containing a given element at nth position

I have a list of lists similar to this: L = {{"a", "b", "c"}, {"x", "c", "y"}, {"i", "j", "h"}, {"x", "b", "z"}} Each list within ...
0 votes
1 answer
79 views

Search for certain entries in an expression

I have a list with large expressions. I would like to find certain functions and their derivatives by searching the list. The search outcome should be the functions/derivatives found only, not the ...
0 votes
1 answer
45 views

Find parameter value for which sharply-peaked constrained 3d-integral equals 1

I want to find the value (desirably to high-precision) of the parameter $i$ for which the constrained 3d integration ...
10 votes
3 answers
957 views

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: ...
8 votes
4 answers
942 views

Find elements of array with largest absolute value

I am wondering how to do in Mathematica the following: Given as an input a large array, I want to output a list of top $n$ entries with largest absolute value + their location within the array. ...
1 vote
1 answer
80 views

How to test if $ⅈ$ is in an expression?

From this answer https://mathematica.stackexchange.com/a/9773/68791 and according to the documentation: FreeQ[list,form] test whether form occurs nowhere in ...
16 votes
2 answers
632 views

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 ...
5 votes
2 answers
541 views

Implementing a Better Grep Command

In Working With String Patterns, Wolfram documentation yields a simple Grep function: ...
12 votes
0 answers
265 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 ...
3 votes
3 answers
268 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 ...
4 votes
3 answers
108 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: ...
5 votes
3 answers
204 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
0 answers
43 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 ...