- This topic has 16 replies, 7 voices, and was last updated 8 years, 8 months ago by
Rajguru M. Mohan.
-
AuthorPosts
-
-
December 12, 2014 at 10:48 am #16676
Joseph Jiang
Participanthi 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.
-
December 13, 2014 at 10:18 pm #16696
Ravil
ParticipantHi 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
Joseph Jiang
Participanthi,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
Ravil
ParticipantIn 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
Joseph Jiang
Participantdear 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
Damian Marek
ParticipantYour 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
-
December 15, 2014 at 9:27 am #16723
Joseph Jiang
Participanthi 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
Ravil
ParticipantIf 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
Ravil
ParticipantAccording to your 2nd question, did you consider the ‘Signal’ and ‘Noise’ tabs of your visualizer screen?
-
December 14, 2014 at 7:44 am #16702
Joseph Jiang
ParticipantRAVIL,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
Ravil
ParticipantJoseph, 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!
-
December 15, 2014 at 9:58 pm #16727
Joseph Jiang
Participantthank you RAVIL.
-
May 5, 2016 at 4:59 am #38882
Jamal
ParticipantRavil,
I tried this code, it works fine for one iteration, but for the next, it is giving me the error of mismatched matrix dimensions.
Any solution for that ?
-
-
March 19, 2016 at 6:10 am #33194
Jamal
ParticipantJoseph Jiang, I’d like to know if you were able to find the snr in matlab.
-
March 19, 2016 at 1:10 pm #33200
SAHIL SINGH
ParticipantHi Ravil and Damian,
Thanks for such a valuable information…
Regards
Sahil Singh
-
March 20, 2016 at 8:20 am #33299
MHD NA
Participantyou 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
Rajguru M. Mohan
ParticipantHi Jiseph,
I don’t think that we could export data from optisystem to MATLAB.
Although i could design the networks using MAtlab code.Thanks,
-
-
AuthorPosts
- You must be logged in to reply to this topic.