Command window output not displaying everything?

16 ビュー (過去 30 日間)
Cole Butler
Cole Butler 2019 年 7 月 22 日
コメント済み: Cole Butler 2019 年 7 月 22 日
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 Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by