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

조회 수: 1 (최근 30일)
Robert Roy
Robert Roy 2016년 5월 17일
댓글: Robert Roy 2016년 5월 17일
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