필터 지우기
필터 지우기

how ca jump in another line in matlab m-file?

조회 수: 1 (최근 30일)
fariba
fariba 2015년 5월 14일
답변: Walter Roberson 2015년 5월 14일
i have a cost function for my ICA. in my cost function 2 optimized values of 2 parameters have to find.parameters are a and b. the constraint of a is [1 50] and for b is [1 30]. the optimized value of b must be less than a. so i added i line in my cost function like below: if a<b jump to first line of cost function end how can i write the jump statement?

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 14일
This is really not recommended. You should instead code something like,
while true
... do some work
if a < b
continue; %restart the loop
end
... do more work
break; %exit the loop
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by