Run into "Paused: Press any key"

조회 수: 30 (최근 30일)
Shinuo Weng
Shinuo Weng 2021년 6월 10일
댓글: Shinuo Weng 2021년 6월 10일
I'm using Matlab 2020a to do some simulation. The old code has been used for monthly, but starting from last week it always run into an automatic pause showing "Paused: Press any key" on the lower left cornor of the command Window...Sometimes, it paused in a few minutes, and sometimes in about an hour...I do have two lines
pause(1);
pause(0.01);
in the for loop, but it would be run every loop. So I don't know where this pause unexpected come from
Any idea?

답변 (1개)

Jan
Jan 2021년 6월 10일
The workaround have been strange. Do you need pause command in your code? Try to replaces them by drawnow. Do you need Matlab to wait for a certain time? Then try:
java.lang.Thread.sleep(duration*1000)
This has less jitter than pause() also.
  댓글 수: 1
Shinuo Weng
Shinuo Weng 2021년 6월 10일
HI Jan,
Thanks for youre reply. I will try what you recommended. That's a real old bummer...
Last week, there was a suddent problem with the Java enviroment variable. I tried to rest the variable under somewhere I don't remember now(this PC?), but it didn't work. I had to uninstal and reinstal to solve the problem I don't know if it is ever related...Just to share.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by