필터 지우기
필터 지우기

break statement

조회 수: 2 (최근 30일)
KKR
KKR 2011년 10월 20일
for oasguess = 0.001:0.1
oaspotmat = spotmat+oasguess;
for i = 1:per
for k = 1:path
oadcfmat(i,k) = cfmat(i,k)./((1+oaspotmat(i,k))^i);
end
end
if (mean(sum(oadcfmat))) < mprice break
end
end
oasguess
Can anyone please tell me what is wrong with break statement on code above? I just gave up. I am trying to find a value of oasguess, when the mean(sum(oadcfmat)) values is lower than mprice.
Thank you in advance.

답변 (1개)

KKR
KKR 2011년 10월 20일
Never mind fellows, I guess I was focusing too much on BREAK, the mistake was in Loop, itself.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by