% This program generates a sine wave with matlab component in OptiSystem
% Input parameter - 
% create an output structure similar to the input

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);
% OutputPort1.TypeSignal = 'Electrical';
% OutputPort1.Noise = [];
% OutputPort1.IndividualSample = [];
OutputPort1.Sampled.Signal = sw;
OutputPort1.Sampled.Time = t;
% plot(OutputPort1.Sampled.Signal)

