필터 지우기
필터 지우기

automatic keyboard key press function

조회 수: 6 (최근 30일)
Andrew
Andrew 2011년 8월 4일
Is there a way to get MATLAB to automatically press a specific keyboard key?
Reason: I am trying to get an image of the Simulink Model during a simulation and at the point which I need to save the model to a picture, it isn't in the view of the full system.
I don't want the user to have to stop and View > Fit System to View for every time the simulation needs to save a picture. During one simulation it might have to do this 96 times.
I need MATLAB to press the space key, which is the fastest way to Fit System to View since at the point of saving the window is the active window.
Thanks

답변 (1개)

Jan
Jan 2011년 8월 4일
I assume there is a way to start the method programmatically also, but you can use the Java robot to simulate a kepress. See e.g.:

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by