필터 지우기
필터 지우기

Is there a command that will refocus the active window back to the command window in Matlab's GUI?

조회 수: 13 (최근 30일)
I am trying to use a script (script A) that prints a letter to the active window every 2 seconds to test the timing of one of my scripts (script B). I have just noticed that when I run script B on a second monitor, so I can see the Psychtoolbox window and the Matlab window, script A finally works when I click on the command window after the Psychtoolbox window flips.
It won't be a perfect fix but if I can find a command (or a functions I can write to mimic this) it should solve the problem for now. I have quizzed the Psychtoolbox boards, as well, in case I can't find an answer here.
I have also found a bunch of questions on this board that are similar to the one I am asking, but they all regard focus shifts from a figure created by MatLab. I am going to try the options given in those answers but as I am not dealing with a figure I believe it won't fix the problem.
  댓글 수: 1
Jan
Jan 2019년 7월 30일
Please mention, what "prints a letter to the active window" exactly means. How do you "run a script on a 2nd monitor"?! Monitors cannot run scripts.What ist "the Matlab window"? What does "the Psychtoolbox window flips" mean?
I do not understand, what you want to achieve, what are you doing currently and which problem you have.

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

답변 (1개)

Adam Danz
Adam Danz 2019년 7월 30일
편집: Adam Danz 2019년 7월 30일
commandwindow() % no inputs
% Will make the command window the active window.
% That is, if you start typing, the text will be
% entered in the command window.
But I agree with Jan that your goal is unclear.

카테고리

Help CenterFile Exchange에서 Timing and presenting 2D and 3D stimuli에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by