Trimming a matrix based on index values
Show older comments
So I have a large matrix where the first column is the time index, and all the other columns are data points at that time index. I want to be able to specific a beginning and end point for the time index (for example -70:50), and essentially get rid of everything outside of this range. I can use this code to get the values at a specific row, but im not sure of the most efficient way to include everything between the two starting points, but nothing else. Do anyone have an idea of the best way to do this?
a(a(:,1)==-70,[2:58])
a(a(:,1)==50,[2:58])
Thanks in advance
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!