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
1
vote
1answer
54 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
48 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
0answers
47 views

Taking real number from polynomial equation [closed]

Hi I have a set of 4 different solution that was solved using a 4th order polynomial equation. We can see that the set of real number solution occurred in set 2 and 4 from the solutions. See code : ...
1
vote
1answer
72 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
206 views

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

I have a Dataset[] like this: ...
8
votes
5answers
244 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
67 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
126 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
74 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
286 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
33 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
76 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
59 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
96 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
53 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
233 views

Selecting elements from a list under multiple conditions

suppose there is the following list: ...
7
votes
9answers
532 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
31 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
57 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
63 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
165 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
240 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
53 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
42 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
75 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
319 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
162 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
90 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 ...
0
votes
2answers
28 views

How to select certain numbers to assign a new value and others still keep same

For an array TestA={15,12,5,8,6}, I want to change the value of number greater than 10 into 0, as TestB={0,0,5,8,6}. When using "Select" command, I will lose some numbers. Thanks.
2
votes
2answers
101 views

How can I implement a simple low pass IIR filter with Mathematica?

I want to design a simple IIR filter with mathematica. For example, consider the filter deigned with this online IIR calculator: ...
8
votes
1answer
153 views

Datasets and Time Values: Filtering and Plotting

After struggling for a few weeks, I have accumulated a few examples of challenging date-related operatations with datasets. Some I have partial solutions; others I cannot yet do. The resources on ...
4
votes
3answers
160 views

Optimising the Selection of MaxValue in Association

Suppose I have the following Association: ...
1
vote
1answer
50 views

Moving map with non-overlapping window

How can I apply a function to a list with non-overlapping window. E.g. $data = \{x_1, x_2, ...., x_n\}$ and we apply f with window size 2 to get $\{f(x_1,x_2), f(x_3, x_4), ...., f(x_{n-1}. x_n)\}$. ...
6
votes
4answers
492 views

How to delete certain lists from a nested list?

I have a nested list as the following example (want to remove lists with same or incremented elements such as {1,2,3,4,5}, {2,2,2,2,2}, {1,1,1,1,1}): ...