# 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.

809 questions
Filter by
Sorted by
Tagged with
1 vote
159 views

...
• 381
1 vote
104 views

### How to transform a list in the following way?

Consider the following list: ...
• 5,927
1 vote
42 views

### Applying the MeanFilter function to individual array columns

How can I use the MeanFilter function on only the second or third column of my table? ...
• 359
54 views

### Specific array filtering - code optimization

I have a nested list where all sublists have a length 2, eg: {{1,2}, {1,1}, {3,4}, {3,5}, ...} I need to filter it for two requirements: Delete all sub-lists ...
• 1,904
241 views

### Select elements from a list based on alphabetical order criteria

I have this code to generate the anagrams for a 6 letters word: ...
• 1,544
89 views

### Error on RecurrenceTable with two variables [closed]

I am trying to simulate a second order filter unit step response with the RecurrenceTable instruction in Mathematica. There's a problem with the second-order ...
• 33
59 views

### How to make the following pairing?

Consider the following list of identifiers: Npart=5000; ilist=Range[1,Npart]; And parameters belonging to the given identifier: ...
• 5,927
1 vote
84 views

### How to compute a weighted mean as a measure of central tendency?

Imagine I have data points in triplicates, as follows  L=\begin{pmatrix} p_{11} & p_{12} & p_{13}\\ p_{21} & p_{22} & p_{23}\\ & \vdots &\\ p_{n1} & p_{n2} & p_{n3} \...
• 4,933
60 views

### Pattern matching with DeleteCases

I'm using Mathematica 14.0 and I'm having a pattern match problem with DeleteCases. The example below illustrates the problem. I define a test string followed by two patterns that both nominally match ...
387 views

### How do I reshape a list of this form?

I apologize if this is an already answered question, but I haven't been able to find it. I have a long list that has this form: ...
• 361
229 views

### Extraction of sublists containing certain sequence pairs

list = {{a, b, c, d, a}, {e, f, a, b, c, d}, {a, b, p, q, c, d, g, h}, {c, d, p, q, a, b}, {a, c, b, d}}; I want to filter sublists of ...
• 82.6k
1 vote
72 views

### How to obtain positions of graphs satisfying certain conditions?

I first generate some random graphs, and then the following code can filter graphs with maximum degree 8. ...
• 2,059
103 views

### I'm tired trying to get subsets

t={{a,b},{},{},{},{a},{a,b},{},{a,b,c},{},{b}} s={{},{a,b,c},{a,b}} Thread[Subset[t,s]] I'm tired of trying to calculate: {a,b} [which is the intersection [{a,b}, {...
83 views

### Delete Null factors out of vector components

After running a very long loop, I get the following result given by a very long vector: ...
136 views

### Issue in the calculus of inverse of terms from a list

to begin i want to warn you that i am a beginner in mathematica. I have to create a function that calculates the impedance total of an association of n (electronical) components. So the formula is 1/Z(...
135 views

### Extracting special sublists from a list

modified list From a numerical evaluation I get examplary result ...
• 55.6k
104 views

### Checking whether a set system is intersecting

I have a set of set systems g. I want to select from g those sets systems that are intersecting, that is for every two sets in ...
105 views

### How to get the function-basis as they appear in the expression?

I have the following expression containing functions eg. Log, PolyLog etc, ...
• 1,897
100 views

### Binary algorithm for finding the range of elements

Consider a sorted list of real numbers listz and some boolean condition condition that involves these numbers: ...
• 5,927
25 views

### Performing Efficient Select on Data with Different Time Resolution

I have two data sources with different time resolution. For data source A (temperature) I have about 1 s time resolution. For data source B (spectra) I have 0.01 s time resolution. I would like to ...
• 490
667 views

### How to remove a high accuracy numerical number from a list?

My numerical calculation gives a list of numbers list = {-0.36, 0.2499999999999992, -0.21, 0.36, 0.36}, I want to delete 0.25 ...
• 4,739
180 views

### Select a subset in the bit-strings with even 1s overlapped - thank you

Model 1 Consider the permutation list of 4-bit-strings: list = Permutations[{0, 0, 1, 1}, {4}] which outputs: {{0, 0, 1, 1}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, ...
• 923
55 views

### Is it possible to ask Mathematica to give/find this largest (absolute value) argument of $\cosh$ in the expression?

I have the expression exp in terms of Cosh functions: ...
• 195
153 views

### DateSelect : columnwise selection applied to a matrix

Let consider : A time interval (January given by Time) A random set of values (Minimal example values given by Val) as ...
61 views

### Can you not use And[] inside a Select[]?

I have a list of lists of integers that are each sorted numerically. Here is a sample of it: {{2, 8, 9}, {3, 7, 9}, {4, 6, 9}, ...}. I wish to only pick out members ...
• 357
58 views

### Comparing graphs in mathematica: shape vs. name

I'm trying to identify and remove duplicate graphs when contracting vertices. To illustrate this, I'll start with two simple graphs where I'm trying to create a function that can recognize them as ...
• 2,430
508 views

### Merging and keeping only the sublists whose first two elements are equal

I have a list containing sublists. ...
• 1,118
243 views

### How to make scrollable TogglerBar?

Consider the following TogglerBar: ...
• 5,927
189 views

### Extracting up to $n$ elements after a specified marker from a list

I have a list from which I need to select up to two elements that follow each occurrence of a marker. For example, the selected marker is ...
• 5,015
293 views

### Express a "not equal to A or B" criterion in Select

I have a list of pairs of strings: myPairsList. I wish to Select all the pairs that do not contain ...
• 10.1k
509 views

### How to find the most repeating row?

Consider the following table: tab={{1,0,0,1},{1,0,0,1},{0,1,0,1},{1,0,0,1},{0,0,0,1},{1,0,0,0},{0,1,0,1}} Could you please tell me whether there is a command which ...
• 5,927
340 views

### How to extract the following data?

Consider the following table: ...
• 5,927
1 vote
101 views

### How to extract the following data from the file?

Consider the following file. It has the form ...
• 5,927
889 views

### Select from list elements greater than next element

Given t1 = {3, 2, 8, 6, 1, 9, 4, 1, 5, 0} I want to get all the elements which are greater than the right neighbor. The result would be ...
• 2,788
480 views

### How to get a Table of pairs (a/b, c/d) where GCD[a,b]==1 and GCD[c,d]==1?

I am trying to make a Table pairs of (a/b, c/d) where GCD[a,b]==1 and GCD[c,d]==1. I have tried the following: ...
• 1,118
1 vote
72 views

### Selecting interesting graph positions with a button press/click or something similar

Assume that I have a graphList as shown below (a simple working example). ...
• 2,111
91 views

### Looking for solutions to filter out one-sided angle pairs in line intersections

I posted something here a while ago, but I think it's a bit messy and difficult to understand. So, I'll create a new post to explain the concept and what I want in a different way, hopefully making it ...
• 2,430
612 views

### Dropping disordered numbers in a list

I have a list of numbers like l1 = (1,2,3,4,8) and clearly, l1 is in order (next number is greater than previous number). Well, ...
2k views

### Find Roman numerals up to 100 that do not contain “I"

The question is from Elementary Introduction to the Wolfram Language, section 28 Tests and Conditionals: Find Roman numerals up to 100 that do not contain “I”. What am I doing wrong that the following ...
• 673
1 vote
68 views

### Sumif and delete cells in Mathematica

I want to create a simple "sumif" formula like in Excel. However, I am desperate since I cannot achieve a result. First, I am importing an excel file with lot of datas. data = Import[ "...
705 views

### Make a list of the first 100 primes, keeping only ones whose last digit is less than 3 [closed]

This is a question from an "Elementary Introduction to the Wolfram Language" Section 28: Tests and Conditionals. We are asked to "Make a list of the first 100 primes, keeping only ones ...
• 673
367 views

### Finding transitive Boolean matrices

I am fairly new here and with Mathematica too. I have a question regarding Boolean matrices but before this I did a random search and got this Defining an arbitrary binary relation But I am unable to ...
• 55
665 views

### Check if a string is a date

I have a list of strings, {"BD4675365", "Corp", "Managers", "Syndicate", "2021-03-08", "8434926"} and I ...
• 2,203
54 views

### How to select only particular values from the list using dialog windows?

Consider some list: list = {"A","B","C","D"} How to select only particular values from it using a dynamic dialog window ...
• 5,927
303 views

### How can I select only rows where a column is equal to any value from some list? [closed]

Consider some data data=Table[{RandomInteger[{0,10}],RandomReal[{0,1}]},10]; and some list list={0,5,7,3}; How can I leave ...
• 5,927
1 vote
58 views

### Selecting elements with a particular slope

I have a dataset for which I want to identify 'groupings' based on three criteria, but only one of them is giving me a headache. The criteria are that each group must: have a minimum number of points ...
• 1,438
1 vote
75 views

### How to leave only the columns satisfying the following condition?

Consider the following pre-generated table: ...
• 5,927
41 views

### Optimization of conditions applying

Let we have some data generator, e.g. lazy tuples or permutations. I need to select data by some conditions cond1, cond2, …, up to 5-6 conditions. All of them need ...
• 1,904
45 views

### Speed up Select Operating on a Large List with Multiple Criteria

I am using the following code to select stocks that have performance data starting before one specified date and ending after a second specified date, as follows: ...
• 1,334