Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

rect pulse in matlab

Status
Not open for further replies.

rameshrai

Full Member level 3
Full Member level 3
Joined
Aug 16, 2010
Messages
158
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
appliedelectronicsengineering.blogspot.com
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)

rect.png

please have a look
thanks
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top