Tagged Questions

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)

1
vote
0answers
59 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
59 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
59 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
60 views

Select data from a Dataset [closed]

I have a dataset that looks like ...
5
votes
2answers
130 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
62 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
69 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
115 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
80 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
183 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
137 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
126 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, ...
8
votes
4answers
302 views

Fast method to select matrix elements based on a vector of positions

There is an operation for which I have long wanted to find a better solution. Let: a be a matrix of dimensions $m\times n$ ...
1
vote
0answers
101 views

How to sequentially select, from a large set of tuples (of matrices), those with a certain property

I'm interested in finding a computationally efficient way for selecting all tuples of matrices which have a certain property. The property I'm interested in is that I want the column sum, of f[the ...
1
vote
1answer
83 views

Nest Replace Function with different rules

I have a table of data that I want to filter. Any value of zero in the table means that value was not calculated, so it should get populated with the tag "NC". Next the table is filtered for all ...
4
votes
4answers
134 views

Better way to select all array indexes matching predicate?

I'd like to select (offset) indexes of a number of array points, that match a selection criteria. I can do this by creating a Table of all the coordinates, and then selecting all the values: ...
2
votes
1answer
48 views

Grouping Nested Lists Based on Differing Values of Single Element

I've a list of lists representing k-rows of truth table having n elements each in a nested list consider ...
2
votes
2answers
108 views

Extracting “records” from a matrix

From a rank 3 matrix like ...
2
votes
1answer
140 views

Find positions where two matrices differ

I have two matrices A and B of identical dimensions. What's the simplest (shortest) way to find the indices of differing ...
0
votes
1answer
53 views

Drop last element of parts of a list [duplicate]

just a simple question for now I guess: I have a list: list={{1, 2, 1}, {1, 10, 1}} I simply want to Drop the last element of the two entries of the list, that ...
0
votes
0answers
39 views

Filter sublists that contain a certain value [duplicate]

This question is a followup from appending elements to sublist mergedList = { { {"a","b"}, -1.5, -5, "no" }, { {"c","d"}, -2,-10, 7 } } I ...
0
votes
0answers
74 views

Improving a function that filters each table from a list of tables

I have written the following function which can take in a list of tables as an arguement, and then filters each one. The function I wrote is below, and the commands I combined are listed below the ...
4
votes
3answers
217 views

Conditional search along the columns of a matrix

I want to implement the following algorithm in Mathematica. Get element along main diagonal of a matrix. If the element along the main diagonal is positive, then return the positions of the elements ...
1
vote
1answer
264 views

Data filtering using Butterworth filter

I want to filter data using Butterworth filter. I am currently using Matlab and I want to know how to do it in Mathematica. I have the following data: ...
2
votes
2answers
203 views

How to select the first “lowest” (first valley) number in a list?

I would to select the first valley of the list of coordinates below. It should be {3, 1}. ...
3
votes
1answer
163 views

Butterworthfilter data filter

I am currently doing a signal analysis and filtering using Matlab. The filter I am using is Butterworthfilter model to filter scattered data (vector data). I am using Matlab as follows: ...
7
votes
1answer
322 views

Using KalmanFilter or KalmanEstimator

I have the following: ...
1
vote
2answers
87 views

Select record when third column matches certain criterion

I've a table with 3 columns. The table looks like this: ...
3
votes
1answer
221 views

Select row from a table by column value [duplicate]

I have the following: animals = {{dog, black, 200}, {cat, white, 100}, {moose, brown, 500}, {zebra,black,100}} If this came from a SQL table called animals, ...
2
votes
1answer
91 views

Restoring the 1-to-1 correspondence between elements in two lists, where one list is used as a guide to prune elements from the other

when we wish to use one list to select items from another using something like Pick, writing the following code, for example, causes us to lose the 1-to-1 ...
0
votes
2answers
106 views

How can I select elements that are true

I have a list of lists. For example, list = {{0,1,0,1,true},{0,0,0,0,false},{0,1,1,1,true},{1,1,1,1,false},{2,2,2,2,false}} I'd like to find all lists that ...
6
votes
4answers
172 views

How to select only NotebookObjects that are referring to ordinary notebooks? (not palettes etc.)

There is of course function Notebooks[] But, unfortunatelly it hasn't got useful options in this context. My question is how to pick ...
18
votes
2answers
502 views

How to make a curve selectable from a scaned image and convert it to a list of coordinates

I have a scanned image (binary-ized): Is there any way to reduce one of these curved lines (full or dotted) to a series of its coordinates (e.g., sampling interval of 0.01 on x-axis)? I've read ...
2
votes
2answers
209 views

Removing trailing zeros from a list

If I have a list like list1={2334.,342.,0.,0.,2322.,0.,0.,0.,0.,,,,,,}; it's easy to remove to trailing blanks with ...
2
votes
4answers
499 views

More elegant way

I read ReplaceOrRemoveInvalidOrMissingData Mathematica documentation, and I tried to apply the same approach to my dataset. I've got two problems, but one is only a style problem! There is one more ...
9
votes
5answers
550 views

Fast way of finding position of Interval containing an Integer

I have a large list (about 2.2 million) of pairs of integers. Each pair defines an Interval[{}]. Given some integer x, I need to ...
2
votes
2answers
182 views

Plotting data in a weird format

I have a lot of data on the following form: data = {{param1,param2,param3,param4,{{x1,y1},{x2,y2},...,{xn,yn}}},...} The first variables in each sublist are ...
0
votes
0answers
134 views

Savitzky-golay filter

How to use Savitzky-golay filter on csv file? I have file.csv in this format: 0.1,1.6,2.8,0 0.2,1.2,2.3,1 0.7,1.5,2.4,2 0.6,1.2,2.7,3 0.4,1.4,2.9,4 0.3,1.3,2.5,5 ...
6
votes
4answers
262 views

Using an ellipse as a threshold for Nearest function

The Nearest function can receive as a threshold parameter a radius to look for elements inside that. From the documentation: ...
8
votes
3answers
291 views

Deleting quasi-duplicates from large list efficiently

I have the need to remove "duplicates" from large (>10K members) lists, where a "duplicate" is either a verbatim duplication, or the element's second entry exists as a first entry for some "earlier" ...
2
votes
1answer
66 views

How to use Select to exclude a single element which I can control? [duplicate]

I have code which inserts an expression into lists that I need to remove. I can insert anything I want, a string, variable, or number, into the lists. Suppose I insert the number 13 as my blacklisted ...
3
votes
1answer
49 views

Properly applying BandstopFilter

In the documentation about BandstopFilter it says that the cutoff-frequencies w1 and w2 in ...
6
votes
7answers
1k views

How to select all elements above the main diagonal of matrix?

How to select all elements above the main diagonal of matrix? I need to create a list of them.
0
votes
1answer
136 views

Using DeleteCases with multiple AstronomicalData properties

I am attempting to use AstronomicalData and DeleteCases together to remove invalid cases of two properties while listing the ...
1
vote
2answers
119 views

Computing lists using AstronomicalData

Edit: Initially in my question I asked how I could search the database of AstronomicalData["Exoplanets"] and return 2 filtered values that only contained valued ...
6
votes
2answers
137 views

Using Except with strings

Suppose that I have the following sample list, called list: list = {"bBb", "aAa", "aaa"}; Now suppose I want to select the ...
3
votes
2answers
121 views

Select elements of a Matrix that are the same (or have certain relationship) and return their position and the element itself

I have a matrix and I want to pick the elements that are the same and return their positions and their values. It seems easy to me, but all I know is how to pick elements that satisfy certain ...
1
vote
2answers
142 views

Deleting parts from a nested list

I have a very long nested list. Here is a short example: list = {{1.2, {1, 1, 1, 1}, {2, 2, 2}}, {0.9, {3, 3, 3, 3}, {4, 4, 4}}, {1.4, {4, 4, 4, 4}, {5, 5, 5}}} ...
0
votes
0answers
63 views

How to delete duplicated sublist [duplicate]

I have a list like this: ...
0
votes
3answers
96 views

How to get the indices of values in a list which are NOT an specific integer?

I got a real array A, where Dimensions[A] == {5000, 5000, 5}. Some of the values in A are ...