I am plotting a pulsetrain of rectangular pulses.
pulse_periods = [0:128]*period; %128 pps
%works for Ampl. default = 1,
r1 = pulstran(t,pulse_periods,'rectpuls', w);
This gives a default amplitude of 1 for the rectangular pulses.
I need to change it to 0.5
I tried
pulse_periods = [[0:128]*period;0.5 * [0:128]]' %128 pps
%does not work for Ampl. = 0.5,
r1 = pulstran(t,pulse_periods,'rectpuls', w);
This is a modification of the periodic gaussian pulse example given in Matlab https://www.mathworks.com/help/signal/ref/pulstran.html?searchHighlight=pulstran
I am unable to change the amplitude for the required rectangular pulses .
What is the mistake I am doing ?