フィルターのクリア

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 Center および File ExchangeTiming 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