the logical answer is 1
显示 更早的评论
ans =
logical
1
I have a pretty big code with a lot of cycles and calculations, is it possible to find out where it comes from?
回答(1 个)
The MATLAB Editor will highlight assignments without a semi-colon:
This is why you should never ignore the warnings shown by the editor: you improve your code and make it easier to track down things like this.
However this does not work for function calls without an assignment....
You can find other solutions here:
https://www.mathworks.com/matlabcentral/answers/20989-how-to-find-from-what-row-an-outprint-comes-from
https://www.mathworks.com/matlabcentral/answers/31597-how-to-find-out-the-output-variable-ans-of-exactly-which-statement-is
etc.etc.
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!