Find the source of output in Command window
21 次查看(过去 30 天)
显示 更早的评论
The code I wrote was quite lengthy. There is a number "2" that keep appearing during iterations. I think I forgot to type ";" somewhere. I am wondering if there is a command that can help me find the source of the problem.
0 个评论
回答(1 个)
OCDER
2018-7-9
编辑:OCDER
2018-7-9
You probably have to write a custom script to search all your code for the semicolon error. See this Q&A which provides a starting point for doing this.
The other way is the use the Matlab Editor, side bar on the right that shows a orange bar for warning/suggestions. An orange line will appear if you forgot to add semicolon. Maybe the line you need to fix is highlighted in orange. Hopefully there isn't too many orange lines...
2 个评论
OCDER
2018-7-9
The warnings are indeed orange. I had to create a lot of mistakes to see the orange hue.
另请参阅
类别
在 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!