필터 지우기
필터 지우기

i want to use goto to jump from third line to eighth line.

조회 수: 1 (최근 30일)
MANOJ KUMAR
MANOJ KUMAR 2020년 12월 22일
편집: dpb 2020년 12월 22일
if(i~=4)
if (dx/yg(i))<tand(sia)
goto X
else
P(i-1)=0
end
else
X
end

답변 (1개)

dpb
dpb 2020년 12월 22일
편집: dpb 2020년 12월 22일
if (i==4)|((dx/yg(i))<tand(sia))
X
else
P(i-1)=0
end
or
if (i~=4)&((dx/yg(i))>=tand(sia))
P(i-1)=0
else
X
end
  댓글 수: 1
dpb
dpb 2020년 12월 22일
BTW, if had rest of loop over i, it's quite possible/probable(?) could eliminate it and vectorize the expression.

댓글을 달려면 로그인하십시오.

카테고리

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