Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
Lab 7

# Lab 7

Ratings: (0)|Views: 73|Likes:

### Availability:

See More
See less

05/24/2012

pdf

text

original

Lab#07
[PERIODICITY & HARMONICS]
LAB WORKS
MATLAB EXPLANATION OF PERIODIC SIGNALSMATLAB CODE
a=-4*ones;b=-3*ones;c=-2*ones;d=1*ones;e=4*ones;f=4.5*ones;g=-5.25*ones;h=5*ones;i=[a b c d e f g h ];y=[-4:3];stem(y,i)
MATLAB
t=-6:0.01:6;

Lab#07
[PERIODICITY & HARMONICS]
LAB WORKS
f=0.5,x=sin(2*pi*f*t);plot(t,x)figure
MATLAB CODE AND IMPLENTATION OF HARMONIC SIGNALS
inc=0.01;w=(2*pi*f);t=0:inc:4f=0.25;har1=sin(w*t);har2=sin(2*w*t);har3=sin(3*w*t);har4=sin(4*w*t); holdonplot(t,har1,'b','linewidth',3') plot(t,har2,'k--')plot(t,har3,'m:')plot(t,har4,'r')
hold off
Harmonics signal and Square wave by cos function
inc=0.01;

Lab#07
[PERIODICITY & HARMONICS]
LAB WORKS
t=-0:.01:10;f=0.5;w=(2*pi*f);x=(4/pi)*(cos(w*t)-(1/3)*cos(3*w*t)+ (1/5)*cos(5*w*t));plot(t,x,'r');
FigMatlab Code of harmonics signal using Subplot Command
inc=0.01;w=(2*pi*f);t=0:0.1:15;