Linked Questions
40 questions linked to/from Find subsequences of consecutive integers inside a list
1
vote
3
answers
813
views
Separate an array in two arrays, the even and odd terms being separated in these two arrays
How can I separate the odd terms in one array and the even terms in another array,i.e., go from
a={1,2,3,4}
to
aeven={2,4} ...
5
votes
3
answers
224
views
Finding negative sequences in a large list: optimization
I ran across an interesting challenge recently, and I was thinking this community would know how to optimize it.
I have several data sets which have (currently) about 50k-100k points. The sets ...
2
votes
2
answers
290
views
How to find the intervals in which a function is positive?
I have to find the positive range for the derivatives of a lot of functions. I have a very inefficient solution.
At the moment I am using a For loop to find the ...
5
votes
3
answers
308
views
Split list of states by run lengths and discontinuous changes in state
I was asked to look into writing some simulation code for a user, where the simulation output (x) would oscillate between three possible states:
...
6
votes
7
answers
178
views
Positions satisfying pattern and grouped
I have a list of numbers and I am looking for a way to most efficiently find positions of values that satisfy a certain condition and group those positions that are sequential. To illustrate, a simple ...
3
votes
1
answer
223
views
Product of non-zero elements in sparse array
How can I multiply the non-zero elements of a SparseArray?
Example:
...
3
votes
2
answers
73
views
Subgrouping elements of list based on their values
In a list of elements I want to group the elements which are in consecutive order. For eg.
...
1
vote
3
answers
269
views
Split list cases where the second element is the same
I have a nested list below.
...
0
votes
1
answer
110
views
Timing and memory use is critical:fast partitioning of binary sparse array
I do experiments were I measure a signal, and I need to know at what time points it is above a threshold. If at a given time point, the signal is above the threshold, then a '1' gets put into the ...
3
votes
1
answer
195
views
Split a (complex) image into sub parts
I'm aware of the solution to a similar problem by Hayashi Yoshiaki. Is there a way of extending the solution to break out the chromosomes from this example I have a mass of data in this format that ...