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.
804
questions
1
vote
1
answer
58
views
Create a set of buttons to change background color of next cell
I came across the following snippet (sorry can't find original location to give credit). I would like pressing any of the generated buttons to automatically go to the next cell and color it the ...
3
votes
2
answers
98
views
Position in nested list under criterium
I start from the following exemplary list, e.g.,
list = {{1, 2, 2}, {3, 2, 4}, {3, 5, 2}, {4, 5, 6}, {2, 5, 6}, {2, 5,
2}};
I learned how to to pick out ...
6
votes
4
answers
309
views
Intersection of two-dimensional lists in one axis
I've these two lists:
l1 = {{a, 1}, {b, 2}, {c, 3}, {d, 4}};
l2 = {{b, 5}, {d, 6}, {f, 7}};
Every list element is a two-coordinates point. I want to retrieve ...
0
votes
1
answer
572
views
Ideal/Brick wall Low/High-pass filters: Fourier approach not working
I am trying to take a signal (as a list) and separate it into the low frequency and high frequency parts around some split frequency f.
Given that what little signal processing I ever studied is now ...
7
votes
6
answers
653
views
row operations in matrix
I got a matrix which has Error and Blank inside. I have to replace Error with ...
12
votes
5
answers
936
views
Select the same elements from lists
I need a special intersectant operation for List other than Set.
There maybe some duplicate elements, also need to count instead of merging as Intersection.
For ...
6
votes
2
answers
118
views
Selecting integers which are not a member in an ordered list of integers
I have an ordered list of integers, i.e.:
list = {1,3,5,6,8,10,12,15};
and I want to know if there is a fast way to get a list of the integers that do not appear ...
4
votes
1
answer
287
views
how to count or extract Cases out of list of association that matches pattern
I have list of associations
...
7
votes
1
answer
72
views
Combine lists that meet specific criteria, and filter them out
I am trying to manage a matrix in Mathematica that has the general architecture
{{a1,b1},{a2,b2}...}
I would like to combine all of the lists that have the same ...
0
votes
1
answer
87
views
List manipulation to select elements
I have a list of data with the following structure:
data = {{1,1, result1}, ..., {i, j, resultij}, ..., {30,30, result3030}}
Namely the first and second elements ...
2
votes
2
answers
796
views
How do I remove particular $x$ and $y$ values from a list of data points?
I have data points of the form {x,y,z}:
s = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}}
And I need to remove entire data points based ...
1
vote
2
answers
225
views
Select from nested list and dropping non matching elements
I have the following nested list
...
2
votes
3
answers
154
views
Selecting the numbers in data that satisfy a relationship with respect to a threshold [closed]
Rip01 is a list of numbers. It's length is 128.
PercentualeTaglio is a number.
I would like to create a list which selects from <...
3
votes
2
answers
221
views
Matching DateObject with Cases
OK, here is something that is me missing the obvious.
I have an Excel spreadsheet consisting of 2 columns and 5 rows. The first column is formatted in Excel as a dd-mmm-yy date. The second column ...
18
votes
3
answers
1k
views
Performance of Select
I have a dataset of 3D coordinates with a length of about $ 4\times 10^6 $.
From this volume I am sequentially selecting coordinates along one axis and manipulating this subset.
My question: Can the ...
1
vote
1
answer
177
views
subscript index notation select certain value [closed]
I have an indexed variable Subscript[p, s, m, t] established using the Notation method. There are various expressions where s, <...
2
votes
0
answers
81
views
Kernel crash with KeySelect and repeated keys on list of rules [closed]
After running
KeySelect[{"a" -> 0, "a" -> 1}, True &]
my kernel either hangs forever (possibly with the eventual warning that "the kernel is not ...
6
votes
4
answers
1k
views
Selecting data from multiple columns
Mathematica has almost the following example in the documentation:
...
4
votes
0
answers
157
views
How to remove circled noise from image
Consider a simplified example:
noise
...
4
votes
3
answers
2k
views
Selecting Values from a List Above a Certain Number
So lets say I create a list of pairs like so:
list = {{1, 100}, {2, 10000}, {3, 100400}, {4,50000}, {5,2000}}
Now, I want to find what entries satisfy the ...
7
votes
2
answers
987
views
How can I code a "smart" version of Chop?
Small is a relative concept for human. Sometimes $0.1$ is small, such as in {0.1,2,4,5}. sometime $100$ also is small,such as in ...
3
votes
4
answers
330
views
Picking first row of a matrix with a positive first element
I have a table of order $30 \times 3$. I want to pick a row from this table which is first to have its first element to be positive, irrespective of the values of the rest two elements.
For ...
19
votes
10
answers
2k
views
Deleting sublists from lists
I have a list consisting of symbols and integers. I would like to delete the integers from the list only if a symbol precedes and follows each integer:
...
6
votes
2
answers
862
views
How to select points from a table that are within some region
there, I encountered this problem while coding:
I generate a table in the r-z plane of cylindrical coordinates:
...
3
votes
1
answer
110
views
Convert MATLAB script to find element positions satisfying more criteria
I am new in this community so forgive me if this is a sort of re-post.
I am trying to convert this MATLAB script:
...
2
votes
4
answers
269
views
How to pick elements from a list with variable condition
Let A and M sets of numbers, with Length[A]=15. I want to do something like
...
3
votes
1
answer
214
views
Select or Drop time-value pairs in TimeSeries
I have an EventSeries object and I would like to keep/drop some time-value pairs in it based on a criterion, e.g., comparing to a threshold or what have you. What ...
4
votes
0
answers
186
views
FIR filter and the relation between Sample rate and cut-off frequency
I have problem to unterstand the logic of the cut-off frequency of the FIR filter.
Suppose my sample rate is 2MHz and I want to design a lowpass filter with a cut-off frequency 100Hz. What will be $\...
1
vote
0
answers
389
views
How to filter data?
I work with this dataset:
...
5
votes
1
answer
475
views
Use cases to select subelements by Regex
I have a nested list and would like to select a sub set of lists using a RegEx and I would prefer to use patterns (mainly for readability).
...
5
votes
1
answer
225
views
Eliminating items from list by rule
I have a list:
testList={{"a","b 3","cd","ef 23"},{"z 12","y","x"}}
and wish to obtain
resultList={{"b 3","ef 23"},{"z 12"}}
...
3
votes
5
answers
307
views
Selecting list elements depending if they contain sub-list elements
I have:
aa = {{1, 1}, {2, 2}}
bb = {{4, 4}, {5, 5}}
cc = {{a, {1, 1}}, {b, {2, 2}}, {c, {3, 3}}, {d, {4, 4}}, {e, {5, 5}}, {f, {6, 6}}}
How can I select all ...
2
votes
1
answer
96
views
Selecting elements in a list by a test on its image over a map [closed]
I want to select all elements x in a list, which i'll name List such that GCD[x,n]=1, for a ...
9
votes
4
answers
438
views
Filter elements in descending order
I want to solve the following problem efficiently:
Given a list of pairs (value, data), I want to remove all the pairs so that the resulting list has the value property of its elements sorted. That ...
2
votes
4
answers
549
views
How to use Cases for nested list?
For example, we have a list ={1,2,3,4,5,6}, we can use Cases[list,x_/; 3<x<10] to pick up ...
2
votes
1
answer
176
views
Sorting of permutations
I would like to output the list of possible permutations of 4 indices but sorted in a certain way. I know that I can the list of possible permutations with
...
3
votes
1
answer
215
views
Dealing with jumps when using MovingAverage
The data referred to as testdat in this question is here if you would like to fiddle with it. Here it is as a ListPlot.
I am trying to plot the "average" of this data and other data like it (and ...
0
votes
1
answer
138
views
Selecting 1st $n$ elements meeting criterion from very long list [duplicate]
I need to select n elements from a list, which satisfy a condition. I need something like
...
1
vote
1
answer
44
views
Separating completely independent systems of BooleanCountingFunctions
I have an augmented matrix as a representation of many instances of BooleanCountingFunction[{k},n][vars], and I want to separate it out into many smaller subsystems ...
9
votes
3
answers
2k
views
high pass filter without losing detail
I have troubles doing a simple high pass filtering...
Downloading the test data, you can see that overimposed on the signal there are some low frequencies and an almost constant slope, that I'd like ...
4
votes
1
answer
213
views
What KalmanEstimator elements tells us?
I'm looking for an interpretation of Kalman filter in discrete time. You know, if we consider an state space on the form of the form
...
2
votes
1
answer
104
views
GaborFilter for pattern extraction
I am trying to use the GaborFilter to extract features such as pixel clusters forming straight lines in a specific direction from images. How ever the Gabor filter is proving hard for me to understand ...
3
votes
6
answers
1k
views
How to select some sublist in a list of list?
Hopping to be clear, I ask this question after some hour of unsucceeded work
I have this list
...
2
votes
3
answers
558
views
How to find a position from list coordinates data points
I have list coordinates data points
...
8
votes
5
answers
702
views
Slot # corresponding to subset of a list in select
Is it possible to use # in the select function preserving the structure of the list?
Here an example of what I mean. Let's say I want to select all the pairs where the first element is 1:
...
6
votes
3
answers
2k
views
Select dataset columns after GroupBy
Very basic question. Probably showing my ignorance, but if I have a dataset like the example in the docs
...
0
votes
0
answers
126
views
Numerical error or mistake when filtering using Fourier?
I am comparing the filtering method using a recurrence filter with filtering using Fourier. I think both methods should give the same answer but they differ by a small amount that could be numerical ...
11
votes
8
answers
6k
views
Selecting positive real numbers from a list?
Is there a short method to select positive real numbers from a list containing both reals and complex numbers? Thank you!
3
votes
1
answer
131
views
Select out of nested list
I have a nested list:
{{{1, 2, 3, 4, 5, 6}}, {{1}, {2, 3, 4, 5, 6}}, {{1, 2}, {3}, {4, 5, 6}}}
and would like to select only those lists out of it with two items ...
4
votes
1
answer
34
views
Merge associations always taking the value that satisfies a given test
I have associations look like this:
data = {<|a -> {2, l1}, b -> {3, l1}|>, <|a -> {3, l2}, b -> {2, l2}|>}
I want the result:
...