- This topic has 4 replies, 2 voices, and was last updated 10 years, 5 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Optiwave software can be used in different industries and applications, including Fiber Optic Communication, Sensing, Pharma/Bio, Military & Satcom, Test & Measurement, Fundamental Research, Solar Panels, Components / Devices, etc..
Download our 30-day Free Evaluations, lab assignments, and other freeware here.
Optiwave software can be used in different industries and applications, including Fiber Optic Communication, Sensing, Pharma/Bio, Military & Satcom, Test & Measurement, Fundamental Research, Solar Panels, Components / Devices, etc..
Download our 30-day Free Evaluations, lab assignments, and other freeware here.
Dear all,
I am a beginner with optisystem, especially for co-simulation with matlab. To understand details of cosimulation. I built sine wave generator with matlab component in optisystem. I havent figured out why it doesn’t work. the matlab code as following:
OutputPort1 = InputPort1;
As=1; % amplitude of sine wave
fc=Parameter1*1e9; % sine wave with 15 GHz
fs=Parameter2; % sample rate
tw=Parameter0; % time window
t=[0:1/fs:tw-1/fs];
cs = length(t);
sw = As*sin(2*pi*fc*t);
for m=1:cs
OutputPort1.Sampled.Signal(m) = sw(m);
end
just to upload osd file. it maybe has problem to pass global parameters sample rate and time window to matlab. but even I used fs=640e9; tw=12.8e-9; the output is still null.
I have figured out. the code should be as following.
As=1; % amplitude of sine wave
fc=Parameter1*1e9; % sine wave with 15 GHz
fs=Parameter2; % sample rate
tw=Parameter0; % time window
t=[0:1/fs:tw-1/fs];
Time = t;
cs = length(t);
sw = As*sin(2*pi*fc*t);
OutputPort1.TypeSignal = ‘Electrical’;
OutputPort1.Noise = [];
OutputPort1.IndividualSample = [];
OutputPort1.Sampled.Signal = sw;
OutputPort1.Sampled.Time = t;
Good job figuring it out! Could you attach the M-file as well, so if users come upon this post they can try it out?
Thanks
Thanks. please file the attached for M-file.
Notifications