Command window output not displaying everything?

14 次查看(过去 30 天)
The command window does not display all of the output in my code. This is a very recent problem, not sure what I could have done to start it. As an example, sometimes I want to see how the variable "a" changes in a loop, so I will include a line of code that says
disp(a);
Usually, I'd be able to see all of the outputs. For example, if I was counting to 100, I'd be able to see the output 1,2,3, etc. Recently, however, MATLAB "deletes" all of the outputs except the very last output, so I only see
a =
100
Any other output is unable to be accessed by hitting the up arrow. It seems that MATLAB will momentarily display it, but then it disappears. Anybody know what to do? Not sure where this problem came from, or how to fix it. I've checked out the preferences for command window, but "Automatically delete output?" does not seem to be an option. Cheers.
  2 个评论
Adam
Adam 2019-7-22
What else is in your code? Do you have the ghastly
clc
sitting somewhere in code called within your loop?
Cole Butler
Cole Butler 2019-7-22
Yes, that was it! It seemed that at one point I thought I was typing in the command window and was instead typing in the editor... how embarrassing. Thank you!!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by