- Append a Paragraph component to your setup file.
- Insert the following expression as the content of the paragraph: %<Foo>.
How can i add a m-file in a report ( in Simulink Report Generator)?
조회 수: 1 (최근 30일)
이전 댓글 표시
How can I add a m-file in a report ( in Simulink Report Generator)? I have already tried with the "Evaluate Matlab function" .but it´s not looking good.
댓글 수: 0
채택된 답변
Paul Kinnucan
2017년 4월 5일
Hi Maura,
You can use the InsertFile component to insert the text of a MATLAB file in your report. Set the component's Import File As option to Syntax-highlighted MATLAB code.
You can use a computed content expression to insert the result of evaluating a MATLAB function in your report as long as the MATLAB file that defines the function is on the MATLAB path. For example, suppose that you have a function named Foo on the MATLAB path and you want to insert the result of evaluating Foo in a paragraph in your report. To do this:
Alternatively, you could use the Evalute MATLAB Expression component to set the result of evaluating Foo to a work space variable and then use a computed content expression to insert the value of the variable in your Paragraph component. For example, suppose you use the MATLAB eval component to evaluate Foo and set its value to the workspace variable FooResult, i.e.,
FooResult = Foo;
You can insert FooResult in your report by seeting the content of the paragraph to %<FooResult>.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!