Cut vector in set range
Show older comments
I have about 10 thousand vectors and I want to cut them all to special range set by my min and max . eg. have only vectors from 600 - 1000 values How to implement it in the best efficient way.
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 11 Aug 2013
How your vectors are stored? in a cell array? If yes
Example
v=arrayfun(@(x) randi(2000,1,100),1:10,'un',0) % your cell array
for k=1:numel(v)
out{k}=v{k}(v{k}>600 & v{k}<1000)
end
Categories
Find more on Matrices and Arrays 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!