Home Forums SYSTEM co-simulation with matlab Reply To: co-simulation with matlab

#16752
Profile Photo
zsliu
Participant

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;

+1

Categories