
how to export the data from optisystem to matlab
hi everybody.i want to know how can i export the data from optisystem to matlab.i want to calculate the SNR as i signed from the picture i attached.by the way, how can i extinguish the signal and noise if i select “convert to noise bin”.thank you all of you in advance.
Attachments:
Responses (16):
-
December 12, 2014 at 10:48 am #16676
hi everybody.i want to know how can i export the data from optisystem to matlab.i want to calculate the SNR as i signed from the picture i attached.by the way, how can i extinguish the signal and noise if i select “convert to noise bin”.thank you all of you in advance.
Attachments:
-
December 13, 2014 at 10:18 pm #16696
Hi Joseph, the best way to do it is to add a signal fork at the location at which you would like to retrieve the data. This fork should be connected to Matlab component. A Matlab file will be created.
-
December 14, 2014 at 7:39 am #16701
hi,ravil,thankyou for your reply!what i really want to know is how to write the matlab code to export the data to calculate the SNR!
-
December 14, 2014 at 11:28 pm #16703
In my opinion, you can create an m-file that reads in an your signal and horizontally concatenates the vector (from each sweep) to an array (thus creating a large signal array representing all the sweeps). For example, a “SweepNum” parameter is first setup in the global parameters (from 1 to N), followed by the “Amplitude” of your Oscilloscope Visualizer…
-
December 15, 2014 at 7:36 am #16718
dear ravil.i understand you,however i am not familar the matlab code in cosimulation in optisystem and matlab especially the interface between optisystem and matlab.can you help me?thank you!
-
December 15, 2014 at 9:03 am #16720
Your first step should be to understand how the co-simulation works! Although not hard it can be a bit confusing. Two things I would suggest is first reading about data structures in Matlab in the help section and searching the forum here for Matlab examples.
There is also a youtube video we made about the process:
Regards
+1 -
December 15, 2014 at 9:27 am #16723
hi DAMIAN,I HAVE TRIED ALL you said including searching all about cosimulation between optisystem and matlab in the forum and i can understand all the examples in the help doc.however if i tried to write matlab code to export data to matlab,i found it is a little hard.and i have another question is that how can i calculate the SNR if i had export the data when the global parameter setting “convert noise bin”.thank you!
-
-
-
December 13, 2014 at 10:22 pm #16697
If you are working with multiple sweeps a signal-vector array will be created. Matlab file will be linked to the name of your visualizer…
-
December 13, 2014 at 10:24 pm #16698
According to your 2nd question, did you consider the ‘Signal’ and ‘Noise’ tabs of your visualizer screen?
-
December 14, 2014 at 7:44 am #16702
RAVIL,AS you know,if we select the global parameter,the signal and noise would transmitted together,so it is necessary to extinguish what is signal and what is noise to get the SNR as i refered to.
-
-
December 15, 2014 at 9:56 pm #16726
Joseph, as an example, here is the matlab code which I used for multiple sweeps of pulse generator (with the parameters I defined above)
i = SweepNum;
SignalVector = InputPort1.Sampled.Signal’;
if i == 1
TotalSignal = SignalVector;
else
TotalSignal = horzcat(TotalSignal,SignalVector);
endIf I get the code for your case I’ll let you know. Good luck!
-
March 19, 2016 at 6:10 am #33194
Joseph Jiang, I’d like to know if you were able to find the snr in matlab.
-
March 19, 2016 at 1:10 pm #33200
Hi Ravil and Damian,
Thanks for such a valuable information…
Regards
Sahil Singh
-
March 20, 2016 at 8:20 am #33299
you can create an m-file that reads in an your signal and horizontally concatenates the vector (from each sweep) to an array (thus creating a large signal array representing all the sweeps). For example, a “SweepNum” parameter is first setup in the global parameters (from 1 to N), followed by the “Amplitude” of your Oscilloscope Visualizer.
-
May 5, 2016 at 11:52 am #38895
Hi Jiseph,
I don’t think that we could export data from optisystem to MATLAB.
Although i could design the networks using MAtlab code.Thanks,
+4
Login You must be logged in to reply to this topic.