Exporters

Exporters include blocks that export results to an OML Workspace, and blocks that export signals as files.

OML Workspace

The SignalOut block lets you send results of a simulation to an OML Workspace from where you can obtain statistics and plot results.

To export signals to the OML Workspace, a model requires a Signal Out block: Palette Browser > Activate > Signal Exporters > Signal Out.

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

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

After running the simulation,you can retrieve the signal in the "prey" OML variable which is accessible in the OML Command Window as you see in the following code block:

> 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, see the F1 help for the Signal Out block.

Signal Files

Blocks in the Signal Exporter palette facilitate the exporting of signals as 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 .txt, .csv and others.