MATLAB Answers

END misunderstood in MATALAB APP

조회 수: 1(최근 30일)
Stefano Massardi
Stefano Massardi 2021년 3월 26일
답변: Reshma Nerella 2021년 4월 8일
Hi everyone
I have a matlab APP with a part like this:
if (dato1(end,6)==1)
trigger =1;
end
The problem is that the environment automatically thinks that the "END" in dato(end,6) is the one terminating the IF structure. As a consequence, the next end is taken by another thing in the code. This also happens in a while cycle where a statement like:
vector = vector2(end,:)
and that END is taken as the end for the while cycle.
The same code in a script works correctly obviously. Is this an issue of the app?
Thanks
  댓글 수: 2
Stefano Massardi
Stefano Massardi 2021년 3월 28일
Yes I indeed solved using dato(length(dato),1)

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

채택된 답변

Reshma Nerella
Reshma Nerella 2021년 4월 8일
Hi,
I understand that clicking on the 'if' is highlighting the wrong end.
This issue is fixed in R2020a Update2.

추가 답변(0개)

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by