Could anyone tell me why I am getting an error with "else" in my code. This is my first time using this software and I am very confused.

조회 수: 2 (최근 30일)

채택된 답변

VBBV
VBBV 2022년 12월 3일
This is standard syntax for if-else statements in matlab
if condtion
...
elseif condition
...
else
...
end

추가 답변 (1개)

Walter Roberson
Walter Roberson 2022년 12월 3일
That code is not MATLAB code. MATLAB codes not use "endif" or "endwhile" or "end else". Also, MATLAB uses == for the comparison operation, not =
It might possibly be Octave code. The purpose of Octave existing is to put Mathworks out of business, so you will need to look elsewhere if you want assistance with Octave.

카테고리

Help CenterFile Exchange에서 Octave에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by