for loop and if statement
1 次查看(过去 30 天)
显示 更早的评论
so This is what I typed after trying your suggestion.
I tried your method and the programm showed forth a syntax error,What could I have done wrong.
2 个评论
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 Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!