rameshrai
Full Member level 3
- Joined
- Aug 16, 2010
- Messages
- 158
- Helped
- 7
- Reputation
- 14
- Reaction score
- 7
- Trophy points
- 1,298
- Activity points
- 2,272
Hi,
I want to generate a rectangular pulse of the figure as attached. I tried various functions available in matlab(pulstran, rectpuls) and code available on the internet but could not produce it.
The last code I tried-
fs = 0.25; % sample freq
D = [0 4 8]'; % pulse delay times
t = 0 : 1/fs : 25/fs; % signal evaluation time
w = 2; % width of each pulse
yp = pulstran(t,D,@rectpuls,w);
plot(t,yp)
please have a look
thanks
I want to generate a rectangular pulse of the figure as attached. I tried various functions available in matlab(pulstran, rectpuls) and code available on the internet but could not produce it.
The last code I tried-
fs = 0.25; % sample freq
D = [0 4 8]'; % pulse delay times
t = 0 : 1/fs : 25/fs; % signal evaluation time
w = 2; % width of each pulse
yp = pulstran(t,D,@rectpuls,w);
plot(t,yp)
please have a look
thanks