ranges = [0,12,20:10:110]; %end points of requested speeds for i = 1:numel(ranges)-1 v{i} = V((V>ranges(i) & (V<=ranges(i+1))); %speeds between endpoints numV{i} = numel(v{i}); %number of speed entries between endpoints end v{end+1} = V(V>110);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
2 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/393583-how-to-write-a-range-of-numbers-in-matlab#comment_554655
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/393583-how-to-write-a-range-of-numbers-in-matlab#comment_554655
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/393583-how-to-write-a-range-of-numbers-in-matlab#comment_558350
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/393583-how-to-write-a-range-of-numbers-in-matlab#comment_558350
Sign in to comment.