I have a fairly simplified example that I would like to study for the best possible solution. I have a dataset:
depth = [0:0.5:20];
I only want to select the "depth" from a certain range, for example from 2 to 5. I can do this with:
d1 = find(depth == 2,1,'first'); d2 = find(depth == 5,1,'first'); depth = depth(d1:d2);
Is there an alternative, cleaner way to do this?
KatyB
source share