Filtering a large vector by two separate vectors with ranges
Afficher commentaires plus anciens
I have a large dataset with about 140,000 rows, I am trying to filter out the rows into certain ranges, which I have stored in two separate column vectors: 1 column for the start indeces, and one for the end indeces. I want to form a vector of this form: [start(1):end(1) start(2):end(2) .... ]. Since each range is not equal in value, I am having trouble using a loop to join the vectors together. Any help is appreciated, Thank you.
Example:
Start = [1; 10; 20];
End = [5; 17; 25];
Desired Result: [1 2 3 4 5 10 11 12 ... 17 20 21 ... 25]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!