the logical answer is 1
Show older comments
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?
Answers (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.
Categories
Find more on File Operations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!