extracting values at set intervals from a vector
2 views (last 30 days)
Show older comments
From the following vector:
depth = [0:0.1:20];
How could I create a new vector that had the same data as 'depth' but a value taken every 0.5, providing an outcome of:
d2 = depth(1:5:end);
Since my data is not actually spaced at 0.1 intervals but at randomly distributed intervals I cannot apply the simple approach shown above. What would be the best methods of achieving this?
0 Comments
Answers (1)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!