Questions tagged [filtering]

Questions on filtering or selecting data based on certain criteria. This is to be used with primary tags such as list-manipulation, string-manipulation or signal-processing, with the primary tag indicating the specific use case.

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

How to subtract two lists based on a key

Let's say you have a dataset with a couple columns, I would like to delete the differences based on one column. ...
5
votes
1answer
39 views

How to select numerical sublists?

I got stuck with a simple problem: Given a list of lists ll={{1,2,3},{2,a},{Pi,4,5}} I would like to select only those sublists which are numeric ...
2
votes
0answers
26 views

How to select a part from a list of text imported from the internet

I import a dataset from the internet like: data=Import["http://www.test.com", {"HTML", "XMLObject"}] The dataset looks like this: ...
1
vote
3answers
60 views

Using select to replace values which meet a condition

I like to use Select statements to clean my data. Usually I will use the Select to exclude data from the next stage of my ...
3
votes
1answer
58 views

How to select paired list from a list

I have a list. {{1, 2, 3, 6, 6}, {1, 2, 4, 6, 6}, {1, 2, 5, 8, 8}, {1, 2, 6, 8,8}, {1, 2, 7, 14, 10}} Now I want to get those ...
1
vote
1answer
51 views

any more efficient function than ContainsAny?

prob[tot_, sub_] := Length[Select[Subsets[Range[tot], {5}], ContainsAny[Range[sub]]]]/ combinat[tot, 5] enter code here this works but as tot goes up, say ...
2
votes
1answer
67 views

Select specific elements of list and pick it

I have a List of elements and I need to pick the element which have the maximum or minimum for the third element and the first and second must be equal e.g. ...
1
vote
1answer
63 views

How to use Map inside Select

Input: Select[Range[10], 2 <= # <= 5 || 8 <= # <= 10 &] Output: {2, 3, 4, 5, 8, 9, 10} In case I have lots ...
0
votes
2answers
53 views

Select a number in a list

here is my question. I have a range of parameters spanning in a given range, a={1,50},b={100,200} and c={300,500}. For every set of parameters I have an indexed vector like this (for a given set): <...
1
vote
1answer
79 views

How to select data from a *.dat file?

Good evening, I have a *.dat file with four columns of data, $ \{t, x_1, x, y\} $. I would like to create another *.dat file containing all the $ y $ corresponding to $ x = x_1 $. Could you please ...
5
votes
2answers
213 views

Picking a different column in each row of a Dataset[]

I have a Dataset[] like this: ...
8
votes
5answers
248 views

DeleteCases for once only

I want to delete an array of elements from another one, DeleteCases seems to be an option, but the problem is that it deletes an element more than once if available,...
3
votes
1answer
228 views

How can I delete rows from a matrix

I tried very hard to find an answer to a trivial problem: which is to delete the rows with Complex Numbers. I tried the following but none worked for me. ...
1
vote
1answer
69 views

How to delete items by value from a list? [closed]

This is a very basic question, but I searched through the official docs for list manipulation and on the site, and I wasn't able to find a specific function to delete item(s) by value from a list. I'...
4
votes
3answers
128 views

How to implement an integration filter on arrays?

I have the discrete integration filters: $$y(n) = Ax(n) + By(n−p) , \text{$A$, $B$ real constants, $p$ positive integer}$$ EDIT: in the initial version of this question I focussed only on the case $...
1
vote
1answer
78 views

Track the location of of dot from noisy image

https://imgur.com/a/SnTYESG (subtraction between the image) https://imgur.com/a/ZdOS5wf (orignal image) From the original image, since my CCD camera is bad, I cannot really see anything. However, ...
6
votes
3answers
291 views

Selecting from a list of tuples

Given a list tuples Tuples[Range[10],2] I'd like to select the ones that match a certain criteria. Namely that for every pair ...
2
votes
1answer
35 views

Filtering data in one step rather than two

When generating a table, whose elements are of varying length, is it possible to delete an element from this list, dynamically, based on its length? For example, given a data set, that is divided up ...
2
votes
0answers
41 views

Does passing patterns between packages alter their name unbeknownst to the user? [duplicate]

This question is a partial followup to my previous question. Mainly, after using With to inject the proper argument in the function at the rhs of ...
2
votes
1answer
77 views

How can Cases detect x as Times[1,x]

I'm trying to use Cases to extract the coefficients of a polynomial $$x^5+6x^4+2x^3-8x^2+x+10$$ I was hoping I can first find the coefficients of the $x,\,x^2,\,...,...
1
vote
1answer
61 views

Extract coefficients from ODE

I'm trying to extract the coefficients from an ODE $$y''''+y''+x^2 y'-6y+ 8\ cos(x)$$ and hoping the code will give a list with all the coefficients in, ranging from lower order to higher order, i.e. $...
4
votes
2answers
99 views

How to extract parts of an expression using Cases

Let the following exprs stand for a list of complicated expressions which we are interested in breaking down into parts by extracting a number of individual ...
5
votes
1answer
55 views

Delete rows by testing multiple columns againts a range of test values

If I have a matrix or table of data, ...
2
votes
1answer
58 views

Filtering data 'geometrically'

I was looking at a very nice answer here, where the question was applying a confidence region to some data. If we plot some data as a scatter plot: ...
4
votes
3answers
234 views

Selecting elements from a list under multiple conditions

suppose there is the following list: ...
7
votes
9answers
538 views

Selecting elements of a list based on range

Suppose I have the following list: ...
0
votes
1answer
31 views

How to import the following file as a dataset?

Consider a file 'temp.txt' (alternative link). I am trying to import it as a data-file, i.e. in the form XXX XXX XXX XXX where XXX denotes numbers. However, I am ...
0
votes
1answer
24 views

How to remove the rows in the following file?

Consider a file file.txt having the form ...
2
votes
2answers
61 views

Select subsets from a list based on a criterion?

Assume we have a set of numbers, for instance $A=\{2,3,4,5,6,7,8,9,10\}$ and we are looking for the sums of reciprocals such that they are less than one. I mean I am looking for all $S_B$'s $$ S_B=\...
0
votes
1answer
32 views

I need to extract data from a multi-valued functions and interpolate them into separate single values functions

The graphed data look like this. I need to extract the data for each curve individually and use Interpolation to create a differentiable function for each curve. Can you show how to do this? I will ...
1
vote
1answer
61 views

Remove regular transient spikes from - otherwise - pretty level data

and let me just say thank you for all the help you good people have been providing to stalkers like me through the years. So, in the next few days or months or years, I'll be acquiring data of the ...
3
votes
1answer
66 views

Interpretation of a Code (Cases)

I have the following code, and have been asked to interpret it: Cases[{1, 3.1, 2/3, x, 3 + I, "Yellow"}, _Integer | _Rational | _Real] I tried to play around the ...
7
votes
2answers
167 views

How can I filter an EntityClass by _not_ having a property?

With Mathematica 12, I can create implicit Entity Classes like: I can also filter for having exactly a specific property, like so It seems quite trivial, but I can't seem to filter by a property not ...
3
votes
4answers
249 views

How to select pairs in a list of pairs where the second pair element is within a specified range? [closed]

I have a list like the following list of pairs: ...
0
votes
1answer
26 views

Deleting numbers from a list based on another longer list [closed]

I would like to delete all elements of a list that are equalled to any element found in a bigger list. For example, if I had A = {1,2,3,4,5} and B = {2,4,6,8,9,12} I would like to get C = {1,3,5} ...
0
votes
0answers
24 views

How to select multi vectors with particular condition

I have a matrix as: a01={{225., 1, 2, 3, 4}, {225.5, 2, 3, 4, 5}, {226., 3, 4, 5, 6}, {226.5, 4,5,6,7}} And I want to choose head: ...
0
votes
1answer
33 views

Extract variables from sum of unevaluted functions

I have sums of the form sum = a f[1,1,0] + b f[1,2,0] + c f[1,2,1] + ... It is always linear in f[a,b,c]. I would like a ...
2
votes
1answer
54 views

Remove elements from a list with a mask

Suppose we have a list {a, b, c} and a mask {1, 0, 1} (or {True, False, True}). And we want ...
1
vote
0answers
28 views

Use of padding in GaussianFilter

I understand from the help that Padding->None is a valid option for GaussianFilter[] With a setting Padding->None, ...
1
vote
1answer
43 views

Methods to filter [closed]

Hi I have a set of data electrical signal measurement in the time domain, may I seek some suggested on how can I filter this set of data. The measurement was done over a period of 43 sec, at 200Hz ...
0
votes
1answer
35 views

Discarding Files of Different Lengths

I have a set of imported CSV files stored under the variable name data. The imported files are of different lengths and I would like to be able to discard the ones ...
2
votes
2answers
76 views

How to create an array of function values omitting certain values

I'm using Array to create function lists, f[1],f[2],f[3],...,f[A] where the values from $1$ through $A$ have unit increment. ...
3
votes
3answers
60 views

How to delete the matrices which contain specific elements

I have a list which contains some matrices. Some of the matrices contain Overflow[] elements. I want to delete these matrices. ...
1
vote
0answers
43 views

Deleting elements of list without specifying position in list [closed]

I have a list {a,b,c,d,e} and I'd like to delete the letters "c" and "e" to get a list of {a,b,d}. I would like to specify "c" and "e" as my input to a function and not the position of the letters, ...
0
votes
1answer
33 views

Highpass/lowpass a set of {N,2} data, where first column is the time?

How can I highpass/lowpass a set of data, where the sample rate is not fixed, but is the first column of data, ie when data = {{t1,x1},{t2,x2},...{tN,xN}}?
0
votes
1answer
23 views

How to save executing time of select list from multi conditions

I have a matrix: `MT={{1, 54, 55}, {2, 841, 5}, {3, 6, 65}, {4, 28, 328}, {5, 188, 21}, {6, 2, 887}, {7, 36, 32}, {8, 7, 2}}` And i need select the list which ...
8
votes
4answers
324 views

Select elements of a list by comparing it to another list

Suppose I have the following lists: ...
1
vote
1answer
24 views

Select lists that don't contain a given element (was: elements in a list (all elements should be satisfied)) [duplicate]

I have a big list, for simple, it just like: ...
12
votes
1answer
165 views

Using Select on Dataset with missing keys

I have a very large dataset with about a million entries with up to 75 keys each. Across the whole dataset about half of the keys are blank. In order to reduce filesize, I have used the following ...
2
votes
2answers
92 views

DeleteCases pattern which applies Chop to all elements

In my current macro, I have: DeleteCases[Chop[FullSimplify[RowReduce[something]]], {0 ..}] This works fine for both, exact and numeric complex numbers (with ...

1 2 3 4 5 11