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
0answers
36 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
80 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” ...
5
votes
2answers
153 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 ...
10
votes
6answers
530 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
40 views

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

I want to restructure a simple dataset. ...
0
votes
2answers
48 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
59 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
81 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
189 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
262 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
109 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
108 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
472 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
64 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
32 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
105 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
58 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
58 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
42 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
80 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
33 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
47 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
91 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
154 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
100 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
59 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
55 views

pure functions in nested select

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

Select From List of Nested Associations

I have an association: ...
2
votes
0answers
92 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
279 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
93 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
161 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
126 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 ...
8
votes
3answers
180 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
320 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
112 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
125 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
148 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 ...
2
votes
1answer
79 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
87 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
152 views

Select data from a Dataset [closed]

I have a dataset that looks like ...
7
votes
2answers
222 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
72 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
87 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 ...
1
vote
3answers
120 views

Removing some data and replacing them with new ones

I have a data list where the elements have the form (time, velocity ). I need to remove some malformed elements in places where the data does not change smoothly and then replace those points by ...
1
vote
3answers
139 views

Selecting a specific complex number from a list

I have a formula which is producing a large (hundreds of elements) list of complex numbers of the simple form $x+iy$. However I'm only interested in the one value which satisfies the conditions: ...
-2
votes
4answers
315 views

Compare elements in a list

Assume that there are three different points in x-y coordinate like: p1={4, -1}; p2={5, -2}; p3={1, 5}; In order to compare these points to each other in a ...
3
votes
5answers
142 views

Creating a new list by dropping sub elements of the original list

Suppose I have a nested listed as follows, {{{1,2},{3,4,5},{2,3}},{{2,3,4},{5,4,1},{1,4,3}},{{3,4,5},{3,4,5}}} Where the elements are, ...
2
votes
3answers
260 views

Using select to pick out elements of nested lists in an odd way

Suppose I have a nested list such as, {{{A, B}, {A, D}}, {{C, D}, {A, A}, {H, A}}, {{A, H}}} Where the elements of interest are, ...