Can the MATLAB Report Generator 3.8 (R2010a) be used to generate a report which calls a user interactive GUI?

조회 수: 1 (최근 30일)
I would like to be able to use the MATLAB Report Generator to create a report for a user interactive GUI.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2010년 8월 19일
To be able to make the Report Generator wait for user input when the GUI is called, you need to make use of UIWAIT/UIRESUME.
The GUI needs to be set up such that UIWAIT is called after the GUI has been created and requires user input (typically in the opening function).
After the user interacts with the GUI and needs the GUI to resume execution, you need to call UIRESUME in the callback of the UICONTROL.
The attached example demonstrates this approach. In this case, the GUI has been created using GUIDE.
To execute this example,
1. Extract the files
2. Double click on 'report_with_guide.rpt' in MATLAB
3. Click on File --> Report (In Report Explorer)
4. This will launch the GUI, enter some input and click OK
5. A report will be generated as a PDF-file in the same directory.
Steps followed to create this example:
1. Created the GUI in GUIDE.
2. In the opening function, added call to UIWAIT
3. In the callback function for the pushbutton, included UIRESUME, corresponding to UIWAIT in step 2
4. Added call to DISP in the callback to print output to the report.
To generate the RPT-file:
1. Started report generator, by executing REPORT at MATLAB command prompt (this opens Report Explorer)
>> report
2. Clicked on File--> New; saved it in the current folder
3. Clicked on MATLAB --> Evaluate MATLAB Expression and added the component
4. In the ‘Expression to evaluate in the base workspace’, added the call to GUI

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2010a

Community Treasure Hunt

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

Start Hunting!

Translated by