sorting of matrix using multiple conditions
6 views (last 30 days)
Show older comments
Debanjan Maity
on 29 Jan 2019
Commented: Debanjan Maity
on 29 Jan 2019
Say i have a 12*2 matrix having two parameters where
a=[2;4;5;80;40;5;43;22;6;56;6;57] &
b=[100;122;132;120;108;200;231;211;165;127;130;150];
i want to get a column matrix using if else statement of 4 conditions like below.
the conditions are 2<a<10 and 110<b<130
the result will be like below, where the conditions match it will show 1 else 0
final result=[0;1;0;0;0;0;0;0;0;0;0;0]
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Shifting and Sorting Matrices 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!