Professional Documents
Culture Documents
2:
To understand the method of a. Defining a matrix in MATLAB. b. Linear algebra in MATLAB. c. Creating M-file in MATLAB. d. Plotting graph in MATLAB.
a = 3 8 54 65 48 6 72 2 4 6 45 5 90 81 10 91 53 34 38 53 47 8 56 5 100
the output in command window will be det = -1.9055e+009 b) Inverse of matrix: Command in matlab:
in=inv(a)
the output in command window will be in = -0.0088 -0.0009 -0.0143 -0.0075 0.0149 0.0103 0.0021 0.0006 0.0174 0.0116 -0.0013 -0.0153 -0.0017 0.0002 0.0126 c) Transpose of matrix: 0.0195 -0.0078 -0.0069 0.0104 -0.0137 0.0113 -0.0030 -0.0104 0.0027 0.0044
Command in matlab:
tr=a'
5 time
10
Lab tasks
1. Prove EULERS formula both by mathematically and graphically using MATLAB:
GRAPHICALLY: Command in matlab t=0:0.01:10 a=cos(t)+(i*sin(t)) subplot(1,2,1) plot(t,a) xlabel('time t') ylabel('Cost+iSint') b=exp(i*t) subplot(1,2,2) plot(t,b) xlabel('time t') ylabel('e^i^t')
Cost+iSint
eit
0 5 time t 10
5 time t
10
i:
Taking R.H.S
where,
5 time t
10
By equation:
By comparing we get
As, x(t)=cos(t)
GRAPH OF
x (t)
0 -0.5 -1 -1.5 -2
5 time t
10
By equation:
By comparing we get
As,
x(t)=cos(t)
GRAPH OF
:
signal with power P 2 3
x (t)
-1
-2
-3
5 time t
10
CONCLUSION: From the analysis of the above signal we concluded that: Graphically it is clear that
Then,