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

1 次查看(过去 30 天)
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

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-5-17
unique(Tresult)
  1 个评论
Robert Roy
Robert Roy 2016-5-17
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?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by