Finding out if the max value in a vector is in a certain interval in a vector?
Show older comments
So im in need of a if statement that looks something like this:
%if max(C) == C(1,16)
% iMax = 1;
%elseif max(C) == C(17,32)
% iMax = 2;
%elseif max(C) == C(33,48)
% iMax = 3;
%elseif max(C) == C(49,64)
% iMax = 4;
%end
and I want to check if the max value in the (1,64)vector C lies in the interval of (1,16), (17,32), (33,48) or (49,64)
but this is probably not the way to do it.
need some help, thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Language Fundamentals 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!