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](https://optiwave.com/wp-content/uploads/avatars/5/5c50657732344-bpfull.png)
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;
else
TotalSignal = horzcat(TotalSignal,SignalVector);
end
—————————————————————————————————-
Categories
- All
-
Knowledge
Contains a detailed Q&A knowledge base. -
General
All non-technical questions. -
System
Optical system design and analysis. -
Instrument
Communicate and control different kinds of instruments. -
SPICE
Opto-electronic circuit design. -
FDTD
Finite-Difference Time-Domain simulation. -
BPM
Beam Propagation Method analysis and design. -
Grating
Fiber optic grating simulation. -
Fiber
Optical fiber design and characterization. -
Exchange
Users can exchange design files.
(Matlab, C++, etc.)