for loop and if statement

조회 수: 1 (최근 30일)
sinesipho mlonyeni
sinesipho mlonyeni 2019년 3월 25일
다시 열림: madhan ravi 2019년 3월 25일
so This is what I typed after trying your suggestion.
matlab.PNG
I tried your method and the programm showed forth a syntax error,What could I have done wrong.
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 3월 25일
Based on the coloring of the text, it appears that you somehow have bad characters in the first line. You should delete it and retype it.
Note by the way that you do not have any if statements in the code you show. Your code is not doing anything conditionally. In the code you posted, x>0 is just a computation whose result is to be displayed.

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

답변 (0개)

카테고리

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