Signal Exporters

Use the Signal Exporter blocks to export results to an OML Workspace, and export signals as files.



Access the Signal Exporters from the Palette Browser > Activate > Signal Exporters.

Export to OML Workspace

Use the SignalOut block in your model to export signals to the OML Workspace and obtain statistics and plot results.

In the example of a classic predator-prey model, the Signal Out block exports the time-based signal for the population into OML.

The name of the signal is defined as a block parameter:

After running the simulation, you can retrieve the signal from the "prey" variable in the OML Command Window as follows:

> size(prey.time)
ans = [Matrix] 1 x 2
3  300256
> size(prey.ch{1}.data)
ans = [Matrix] 1 x 2
1  300256
Then you can extract, analyze and plot the actual population:

> mean(prey.ch{1}.data)
ans = 1.93480719
> plot(prey.time(1,:), prey.ch{1}.data)
Note: The buffer size for this example needs to be increased in order to store all required data points. For more details, press F1 to view the help page for the Signal Out block.

Export Signals as Files

Use the ToHDF, ToMat, ToTextFile and ToCSV blocks to export signals as .h5, .mat, .txt, and .csv files.

In addition to sending signals to an OML Workspace, you can also export signals as files for reuse.

The Signal Exporter palette includes many blocks that can be exported to various formats such as .h5, .mat, .txt, .csv and others.