if column 1 value is within a range, return values in column 3
Show older comments
I have a matrix of 3 columns. How can I return the values in columns 3 where the column 1 value is >=25 and <=35
Answers (1)
Star Strider
on 26 Aug 2020
If ‘M’ is your matrix, this should work:
Col3 = M((M(:,1)>=25 & M(:,1)<=35), 3);
.
Categories
Find more on MATLAB 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!