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)

3
votes
5answers
120 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
69 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
56 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
36 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 ...
3
votes
2answers
120 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
41 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
167 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
561 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
44 views

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

I want to restructure a simple dataset. ...
0
votes
2answers
56 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
62 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
88 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
216 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
301 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
115 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
113 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
478 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
80 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
36 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
118 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
68 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
59 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
48 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
91 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
52 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
99 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
168 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
105 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
62 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
64 views

pure functions in nested select

I want to select certain rows from a list by using two nested Select commands ...
3
votes
1answer
109 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
125 views

Select From List of Nested Associations

I have an association: ...
2
votes
0answers
96 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
285 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
99 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
170 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
0answers
129 views

LowpassFilter in v10: unit issues?

Bug introduced in 10.0.0 and persisting through 10.0.2 or later I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for ...
9
votes
3answers
191 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
323 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 ...
1
vote
1answer
116 views

Select last occurence of key in dataset

I have a large Dataset filled with data from a SQL DB. I sort the set via name and date with the SelectBy function and get ...
1
vote
4answers
146 views

Removing all values from a list that satisfy a given condition

Suppose I have a list, list = Table[{n}, {n, 1, 5}] (* list = {{1},{2},{3},{4},{5}} *) and I want to remove all values from this list that are greater than 3, so ...
1
vote
0answers
155 views

Butterworth Bandpass Filter

I am translating someone else's code which is written in matlab to mathematica. I need help to design a Butterworth bandpass filter in mathematica to filter a sine wave. the sine wave is generated ...
5
votes
1answer
94 views

Working example for the built-in SavitzkyGolayMatrix for doing polynominal smoothing

Have been using various packages SavitskyGolay.m for Savitsky-Golay polynomial smoothing but just noticed the built-in matrix kernel. I am looking for an example ...
2
votes
1answer
94 views

Select in complex dataset query

I want to use Select for a more complex dataset query. Part of the query shall be dynamic, depending on the user input. The Select part looks something like ...
1
vote
1answer
166 views

Select data from a Dataset [closed]

I have a dataset that looks like ...
7
votes
2answers
237 views

Advanced SQL-type select statements (filtering) on Datasets

I'm trying to improve on mathematica's handling of datasets. I'm currently writing this function that should do the following. Suppose I have a dataset with columns, e.g. ...
2
votes
1answer
75 views

How to select elements with a specific style of a list?

Suppose I have a list: where 3 'up's of the list are red(I've made it to Cell Expression as follows). ...
2
votes
0answers
88 views

Gradient Filter Function

I am trying to understand EXACTLY what the GradientFilter function in Mathematica is doing. As far as I can tell, it appears to be doing a convolution of a first derivative of a Gaussian with the ...