Professional Documents
Culture Documents
Lab. No.: 03: Sequences
Lab. No.: 03: Sequences
: 03
Lab. Objective: To get simulation skills in Matlab for plotting of different analog signals and
sequences.
% Defining Vector
X=[1 2 3 4 5];
%Plot of Vector
plot(X)
4.5
3.5
2.5
1.5
1
1 1.5 2 2.5 3 3.5 4 4.5 5
% Defining Matrix
X=[1 2 3; 4 5 6; 7 8 9];
%Plot of Matrix
plot(X)
9
1
1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
t=[0:.01:10];
A=2;
y=2*A*sin(t)
plot(t,y)
-1
-2
-3
-4
0 1 2 3 4 5 6 7 8 9 10
t=[0:.01:15];
A=2;
y=2*A*cos(t)
plot(t,y)
-1
-2
-3
-4
0 5 10 15
t=[0:.01:10];
A=4;
y=2*A*tan(t)
plot(t,y)
12000
10000
8000
6000
4000
2000
-2000
0 1 2 3 4 5 6 7 8 9 10
t=[0:.01:10];
a=4;
y=exp(a*t);
plot(t,y)
17
x 10
2.5
1.5
0.5
0
0 1 2 3 4 5 6 7 8 9 10
a=-5;
y=exp(a*t);
plot(t,y)
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8 9 10
t=[0:.1:10];
f=50;
y=-5*sin(2*pi*f*t)+10*cos(2*f*t);
plot(t,y)
10
-2
-4
-6
-8
-10
0 1 2 3 4 5 6 7 8 9 10
Lab. Assignment
Y=10x8-5x6/2x2-x