Recording and saving a GUI experiment in Guide?

3 ビュー (過去 30 日間)
Franck paulin Ludovig pehn Mayo
Franck paulin Ludovig pehn Mayo 2022 年 4 月 16 日
回答済み: Vidip 2023 年 12 月 1 日
Hello ,
I would like to be recording and saving the screen each time i am doing an experiment in Guide (GUI). I do not how to start any information concerning that?
Should i create a new pushbutton? If yes, which callback should i use .
  3 件のコメント
Franck paulin Ludovig pehn Mayo
Franck paulin Ludovig pehn Mayo 2022 年 4 月 20 日
@Geoff Hayes basically i would like to record/save what is happening in the "figure" when running the GUI. I would like to record the whole experiment that is taking place there.I have different set of experiments that is happening each time i click on a "Next" button.
I would like to record each set of experiments. They are all happening in the "Figures"
Geoff Hayes
Geoff Hayes 2022 年 4 月 21 日
@Franck paulin Ludovig pehn Mayo - if you want to record what is happening in the figure and/or the whole experiment, then you would need to use a timer to periodically get a snapshot of what is happening on the figure, and then save it to a file either as an image or to update a video file. It might actually be easier to use third party software (maybe QuickTime) to record the screen session.

サインインしてコメントする。

回答 (1 件)

Vidip
Vidip 2023 年 12 月 1 日
I understand you want to capture and save the screen while running a GUI created with GUIDE in MATLAB, for this you can create a new push button and use its callback to capture the screen. You can follow these steps for the same:
  1. Create a New Push Button: Open your GUI in GUIDE, and from the "Tools" menu, select "Insert Standard Components" and then choose "Push Button." Place the button where you want it in your GUI.
  2. Create Callback Function: In the Callback Editor, create a new callback function for the 'ButtonDownFcn' event. This function will be called when the button is pressed.
  3. Capture and Save Screen Function: Now, you need to create the function captureAndSaveScreen that captures the screen and saves it. You can use the ‘getframe’ and ‘imwrite’ functions for this.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by