Professional Documents
Culture Documents
Unit impulse
t=-5:5;
y=[zeros(1,5),ones(1,1),zeros(1,5)];
subplot(3,2,6);
stem(t,y);
xlabel('x');
ylabel('y');
>> title('UNIT IMPLUSE') ;
Ramp function
n=10;
t=0:n;
subplot(3,2,3);
stem(t,t);
xlabel('x');
ylabel('y');
title('RAMP SEQUENCE');
Exponential sequence
n=10;
t=0:n;
a=.6;
y=exp(a*t);
subplot(3,2,4);
stem(t,y);
xlabel('x');
ylabel('y');
title('EXPONENTIAL SEQUENCE');
Experiment no: 2
Aim: To find the transfer function.
Experiment no: 3
Aim: To find the transfer function of close loop by using MATLAB
Transfer function:
s+2
-------------------------500 s^3 + 1000 s^2 + s + 1
Experiment no: 4
Aim: To generate the sinusoidal, triangular, square wave by using
MATLAB
1)
clc;
clear all;
close all;
T=2;
t=2:.01:10;
x1=sin(2*pi*t/T);
subplot(2,2,1),plot(t,x1);
xlabel('t'),ylabel('x1')
2)
clc;
clear all;
close all;
t1=-20:.01:20;
x2=square(t1);
subplot(2,2,2),plot(t1,x2);
xlabel('t1'),ylabel('x2');
3)
clc;
clear all;
close all;
t1=-20:.01:20;
x3=sawtooth(t1);
subplot(2,2,2),plot(t1,x3);
xlabel('t1'),ylabel('x3');
Experiment no: 5
Aim: To generate the Amplitude modulated wave.
Software require: MATLAB 2010a
clc;
clear all;
close all;
fc=input('Enter the carrier signal freq in hz,fc=');
fm=input('Enter the modulating signal freq in hz,fm=');
m=input('Modulation index,m=');
t=0:0.001:1;
c=sin(2*pi*fc*t);
M=sin(2*pi*fm*t);
subplot(3,1,2);plot(t,c);
ylabel('amplitude');xlabel('time index');title('carrier signal');
subplot(3,1,3);plot(t,M);
ylabel('amplitude');xlabel('time index');title('Modulating signal');
y=(1+m+M).*c;
subplot(3,1,1);plot(t,y);
ylabel('amplitude');xlabel('time index');title('modulated signal');
t=0:0.001:1;
c=sin(2*pi*fc*t);
M=sin(2*pi*fm*t);
y=M.*c; Enter the carrier signal freq in hz,fc=100
Enter the modulating signal freq in hz,fm=50
Modulation index,m=.6
OUTPUT
Experiment no: 6
Aim: To generate the Frequency modulated wave.
Experiment no: 7
AIM : To find the root locus of given transfer function
den =
1.0000 3.6000
Transfer function:
s+1
------------s^3 + 3.6 s^2
Experiment no: 8
Aim: To find out the response of given feedback function
Software require: MATLAB 2010a
>> close all;
clear all;
Ka=1
Gnum=0.9;
Gden=[0.1 1 0];
'G(s)'
Gs=tf(Gnum,Gden)
G1=Gs*Ka
Ts=feedback(G1,1)
P=pole(Ts)
step(Ts)
Ka = 1
ans =
G(s)
Transfer function:
0.9
----------0.1 s^2 + s
Transfer function:
0.9
----------0.1 s^2 + s
Transfer function:
0.9
----------------0.1 s^2 + s + 0.9
P=
-9
-1