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.

How to create wave below using MATLAb

Status
Not open for further replies.

vino_scorpio85

Newbie level 2
Joined
Sep 11, 2006
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
i had try this using matlab. i use pulse generator to generate the wave. but there is some warning. Can someone help me to find the answer.

60_1157988687.JPG
[/img][/code]
 

In that image the times where the wave rises or fall is not well specified, but asuming that the width of the pulse is 2, then you can do it this way:

Code:
t=-6:0.01:6;
signal = zeros(size(t));


for n = 1:length(t)
   
   if (abs(t(n)) <= 1 | (abs(t(n)) >= 3 & abs(t(n)) <= 5))
      signal(n) = 2;
   end
end

plot(t,signal)

You can also calculate the fourier series, and build the signal up from it.

Hope this helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top