Find the maximum value of a set of arrays in a for loop

2 views (last 30 days)
Hi there, Ive currently got this code and what I am wanting to do is tak the maximum possible value of Tresult, doenst matter what loop it is in? I am jsut wonbdering if anyone can help
if true
for j=j1:j2;
for l=l1:l2;
Cr1=[x_start y_start+(l*(y2/Res)) x/Res y2/Res];
Cr = imcrop(YourData, Cr1);
Tresult(:,j)=mean(Cr).';
end
end end

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 17 May 2016
unique(Tresult)
  1 Comment
Robert Roy
Robert Roy on 17 May 2016
Thanks but is there anyway I can implement it as part of the loop to make sure that its the largest value of all the values, not just at the end of the loop?

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements 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!