How can i add a m-file in a report ( in Simulink Report Generator)?

1 visualización (últimos 30 días)
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.

Respuesta aceptada

Paul Kinnucan
Paul Kinnucan el 5 de Abr. de 2017
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:
  1. Append a Paragraph component to your setup file.
  2. Insert the following expression as the content of the paragraph: %<Foo>.
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>.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by