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.

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

Using Select function to select elements based on last element of nested list [closed]

Good morning, I have a list with each element containing a tuple and a single. It is of this form: ...
6
votes
1answer
90 views

Why the BandpassFilter is different than applying LowpassFilter then HighpassFilter

If I generate some data with noise, and use a filter to filter the noise, why does BandpassFilter not produce the same results as using ...
6
votes
1answer
140 views

Smoothen the curve found by EdgeDetect

It seems that curves found by EdgeDetect always persist $C^{0}$ continuity only. Consider the following example: ...
4
votes
3answers
116 views

How to find points along the inner and outer edge of a ring along a specific direction

I have a set of random numbers distributed on a annular disk. I want to find points on the inner and outer edge along a particular angle. One possibility is to use ...
5
votes
1answer
97 views

How to make sense of LowpassFilter, SampleRate and the cutoff frequency ωc in different Mathematica versions?

How do you make sense of the scale of "time" and "sampling" when using LowpassFilter and SampleRate ? Given the test data with ...
1
vote
1answer
50 views

Pure “Select” function over matrix

I have several lists of tuples in the following shape: l1 = {{1, 134}, {2, 314}, {3, 164}} I do want to select, from each list, list elements fulfilling a ...
0
votes
1answer
33 views

How to extract an association with similar keys from another association?

Considering we have an association like: ...
2
votes
1answer
110 views

Why is there a difference when formulating patterns for Select and FirstPosition?

Select[{1, 2, 4, 7, 6, 2}, # > 2 &] Gives {4, 7, 6}. OK! So one should think that the following would work: ...
1
vote
5answers
128 views

Select using MemberQ

I want to make a selection on this list ...
3
votes
5answers
135 views

How to filter list of list of rules on certain condition?

For example, Solve[] returns all solutions as a list of list of rules. And mine looks something like this: ...
-1
votes
1answer
72 views

Coefficient: how to simplify the “form” [closed]

The title is not very clear, but my English is not that good, so I didn't know how else to write it. So, let's get to the problem. I have a list of elements, in form of a sum, like this: $finalstate ...
1
vote
1answer
59 views

How to perform multi-columns selection and/or !MemberQ on large lists with speed?

This question (2 subquestions) is connected to How to speed up Select with MemberQ for large lists? Q1: I would like to have an alternate version of the form below to do a multi-columns selection on ...
3
votes
0answers
60 views

Nonuniform Savitzky-Golay filter for smoothing and differentiation

The classical Savitzky-Golay filter works only with uniformly sampled data and currently we have at least two good implementations of it for Mathematica published on our site. But in many practical ...
5
votes
2answers
129 views

How to speed up Select with MemberQ for large lists?

I have two large lists: list1 and list2. I would like to select elements of list1 only if they appear in list2. Since the list1 has dimensions of (335000, 2) and list2 : (122000, 4), it's taking a ...
0
votes
0answers
45 views

Referring to arguments in nested functions

I am interested in executing the following command but don't know the proper syntax to distinguish between nested arguments, here at the Select[] and Map[] levels. For example, ...
3
votes
3answers
83 views

Identifying locations of entries in an array

If I’ve got a big array displayed in Mathematica, is there a way for me to select a particular location on the screen and have Mathematica tell me “You’ve selected the entry in row 137 and column 92” ...
6
votes
2answers
181 views

Filtering of an unwanted frequency through a Fourier Transform

I have a data set with evenly spaced data points. The plot is frequency vs. intensity. The overall shape of the plot is an upwards curve into a plateau, this cannot be seen in the data as this is an ...
11
votes
6answers
574 views

How to find all the positions of max value of a list efficiently?

For Example, list=RandomInteger[{1,100},2000]. Yes,I know Position[list,Max[list]] can do. But it's based on pattern ...
1
vote
1answer
47 views

Conditional Drop of a Key based on a test of the Value

I want to restructure a simple dataset. ...
0
votes
2answers
61 views

How to keep elements only if their first key is part of another list? [duplicate]

I have two huge lists: list1 and list2. I would like to keep elements of list1, only if ...
3
votes
2answers
64 views

Select elements from list with given head

I would like to select elements from list by specifying their head. E.g. SelectWithHead[{1,2,3.5,x}, Symbol] = {x} SelectWithHead[{1,2,3.5,x}, Real] = {3.5} What ...
1
vote
2answers
101 views

Slicing multidimensional table

Say I have a multidimensional list created in the following way grid= Table[{i, j+1, k+2}, {i, 0, 1}, {j, 0, 1}, {k, 0, 1}] grid={{{{0, 1, 2}, {0, 1, 3}}, {{0, 2, 2}, {0, 2, 3}}}, {{{1, ...
13
votes
2answers
231 views

Clean and handy Options management/filtering

the case I want to be able to create a function with some default options but also without need to add full explicit list of options available for it. And then inside I want to be able to filter ...
10
votes
2answers
431 views

How to remove outliers from data

I have a data with noise which some times includes significant outliers. The position of the outliers are random. For example: ...
2
votes
3answers
119 views

DeleteDuplicates in a list of 2-tuples under condition

Having a list of 2-tuples, I would like to delete such 2-tuples that have 0 at second position, but only those, whose first element is not unique in the list. E.g. ...
4
votes
2answers
117 views

Apply an accumulative function to each column of a dataset

Given a dataset with many columns, how can apply a function (in this case Count[Missing_]) to each column? ...
9
votes
2answers
483 views

How do I prune a list of pairs of numbers so that each number occurs on only one pair?

How do I select only the first pair of numbers in which a number occurs from a list of pairs of numbers? For example, I have ...
0
votes
2answers
98 views

selection based on values of other list

I want to make a selection of a list based on the values of a other list list1 = { {1, 2, 3, 4}, {1, 2, 5, 6}, {2, 3, 4, 5}, {5, 6, 7, 8}} list2 = {1, 2, 3, 4} ...
0
votes
1answer
39 views

Selecting from a list [duplicate]

OK, I know this must be a simple problem, but right now I'm just stuck and need some advice with this :). I have the following list: ...
3
votes
3answers
136 views

Selecting sublists of different length if at least one element of the sublist fulfills a criterion

I have the following list, containing sublists with 1,2 or 3 elements. ...
2
votes
2answers
82 views

Extracting numerical coefficients from an expression

I have very large expression and I want to extract and sum up all the numerical coefficients which multiply the summands. For example, expr = x + 2*y + 3*z*w ...
1
vote
1answer
65 views

Using Select to obtain certain elements

I want to do an apparently simple Select, tried all sorts of variations, but didn't find the correct. What I want is ...
0
votes
2answers
53 views

Selecting elements from a list [duplicate]

I have the following array of numbers: a = {{0, 2, 5}, {3, 5, 1}, {4, 0, 5}, {8, 3, 4}, {0, 8, 6}}; then I make a list of the first row with ...
0
votes
0answers
104 views

How to filter my signal?

As you can see, my signal is superimposed by an other sinus which has a slightly longer frequency. I would like to filter this out. I think I can do the filtering process, but there is one step that I ...
0
votes
0answers
34 views

Doing a repeated calculation on unique chunks of data based on a value in a column

First post ever on a forum, please bear with me if I don't get it right the first time :) I'm making a script for someone that imports a data file, generates some histograms, tables, and outputs them ...
1
vote
0answers
60 views

How can I union a set of images? [closed]

What is the best way to do image de-duplication in Mathematica. I've used a tool called Visipics in the past, which works well, but I need to do this in MMA. Basically the function I'm looking for, ...
4
votes
3answers
108 views

position of rows (or columns) whose elements all satisfy a condition

How do I determine the position of rows whose entries all satisfy some condition (e.g., all elements of the row are positive)? I've found out how to use Select to ...
4
votes
2answers
182 views

How to check whether elements of a list meet a condition without generating the whole list first?

I have to find the number of elements satisfying a given condition from the set: Tuples[Tuples[Tuples[{0,1},n],n],m] The condition for $n=3,m=3$ is: ...
1
vote
3answers
111 views

How to filter acoustic signal

I have a huge data file which I can't ListPlot. This code generates similar kind of data: ...
1
vote
1answer
64 views

Using the string Match with options! [duplicate]

Here is what I want to do: I have a list of strings for example s={"red carpet","red box","black carpet","black box"} I want to use something like ...
1
vote
1answer
68 views

pure functions in nested select

I want to select certain rows from a list by using two nested Select commands ...
3
votes
1answer
116 views

OutputResponse and RecurrenceFilter failure in WM10 with increased precision datasets

Suppose I import sound from file into data list, like this: (Set file name and path) nFileName = "p:\\TrueOscill250HzLongNoHiss128kSps.wav"; (Importing ...
7
votes
1answer
153 views

Select From List of Nested Associations

I have an association: ...
2
votes
0answers
102 views

Position from 3 dimensional acceleration data? [closed]

Per a previous post on Mathematica StackExchange here I'm trying to utilize 3-axis accelerometer data to determine approximate 3D position. I wanted to start with a simple case. To this end I've ...
2
votes
3answers
291 views

Picking items from a list

There's probably a Mathematica primitive to do this, but I don't know what it is...suppose I wanted to construct a list of all integers from $1$ to $n$ that were not divisible by $12$, and that were ...
4
votes
1answer
111 views

Filtering Query Nested Data (Dataset and Association)

I am trying to filter a nested Dataset. I have some data that looks like this (curated for this example): ...
3
votes
2answers
191 views

how to extract the string using regular expressions

I have the list : a1 = {"struct name1 {","struct name2{","struct name3{","struct name4{", "struct name5{","struct lastStruct{"} I tried to extract the ...
4
votes
1answer
155 views

LowpassFilter in v10: unit issues?

Bug introduced in 10.0.0 and fixed in 10.1.0 I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for ...
9
votes
3answers
205 views

Complicated list slicing

Say I have a list with the structure list = {{1, {x1, y1, z1}}, {2, {x2, y2, z2}}, {3, {x3, y3, z3}}, ...} I would like to slice it such that I end up with ...
15
votes
1answer
333 views

Why does this line increase the consumed memory?

Probably this is a simple question, however I really don't understand this behavior in Mathematica. It particularly leads to a memory leak in a huge program I have to do processing of 3D images. I ...