Home Forums SYSTEM How to export a graph from OptiSystem into MATLAB Reply To: How to export a graph from OptiSystem into MATLAB

Profile Photo
Tech Support

Here’s some additional information from our OptiSystem team:

The best way to immediately save data into Matlab is with the Matlab component

We would add a signal fork at the location at which you would like to retrieve the data (connecting one of the forks to the Matlab component).

As an example an m-file can be created that reads in an electrical signal and horizontally concatenates the vector (from each sweep) to an array (thus creating a large signal array representing all the sweeps). The example setup is shown in the enclosed images where a “SweepNum” parameter is first setup in the global parameters (from 1 to 5), followed by the “Amplitude” of the Pulse Generator (which is linked to the SweepNum) and a parameter SweepNum that is created in the Matlab component and linked also to the Global Parameter “SweepNum”.

The m-file that can be used is shown below (and also enclosed).

i = SweepNum;
SignalVector = InputPort1.Sampled.Signal’;

if i == 1
TotalSignal = SignalVector;
TotalSignal = horzcat(TotalSignal,SignalVector);