Command window output not displaying everything?

조회 수: 14 (최근 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 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