Introduction to MATLAB for Engineers
Introduction to MATLAB for Engineers
TP
Formation:
Made by :
LPER
AIT IJJA Abdelilah (2018/2019)
General Introduction
Presentation of MATLAB
All over the world, millions of engineers and scientists use MATLAB to
analyze and design the systems and products of tomorrow. MATLAB is present in systems
active safety automobiles, spacecraft, medical monitoring devices,
smart electrical grids and LTE mobile networks. It is used in the fields of
machine learning, signal processing, computer vision, communications,
computational finance, controller design, robotics, and much more.
Exercise 2 :
Exercise 3: Exercise 4:
u = 11 - 7i;
u=[1,-1,2]'; v=-1+3i;
v=[10,-1,3]'; Mu=norm(u);
w=[5,-1,4]; Mv=norm(v);
A1=3*u; A1=abs(u);
A2=norm(u,2); A2=conj(u);
A3=real(u);
B1=((2*u)-v+(5*w)); A4 = imag(u);
B2=norm(B1,1); B1=abs(v);
C1=w-(4*v); B2=conj(v);
C2=norm(C1,inf); B3=real(v);
% alpha=cos(v:w); B4=imag(v);
P1uv=u*B2;
P1uv = v * A2;
>> ex3 SRuv=real(u^3+v^2)
SIuv=imag(u^3+v^2)
A1 =
3 ans =
-3 13.0384
6 ans =
A2 = 3.1623
2.4495 ans =
B1 = -32.0000 -26.0000i
17 -13 12 ans =
24 -6 19 -32.0000 + 26.0000i
26 -4 21 ans =
B2 = -294
67 ans =
C1 = -2204
>> exercise 4
-35 -41 -36
9 3 8 SRuv =
-7 -13 -8 -294
C2 = SIuv =
112 -2204
Exercise 5: Exercise 6:
A=[1,2,3 ; -5,3,1 ; -10,0,3]; A1=[1 -1 7;-4 2 11;8 0 3];
B=[1,-2,5;6,1,-1;1,0,-2]; B1=[3 -2 -1;7 8 6;5 1 3];
C=[10,-5;3,1]; A=3*A
I3=[1,0,0;0,1,0;0,0,1]; B = A .* B
M1=A*B; C=A*B
M2=B*A; D = A / B
M3=A*B'; E=cos(A)
D=I3-B*B'; F=cos(B)
det(A); G=exp(B)
det(B);
det(C);
E=A*A';
inv(A);
inv(B);
inv(C);
inv(D);
inv(E);
VP = eigen(E)
Exercise 7: Exercise 8:
A=[1,2,3 ; -5,3,1 ; -10,0,3]; A=[1 -1 7;-4 2 11;8 0 3]
B=[1,-2,5;6,1,-1;1,0,-2]; v=[1 2 4 7]
C=[10,-5;3,1]; disp('A(v)=A(v)+0.01')
I3=[1,0,0;0,1,0;0,0,1]; A(v)=A(v)+0.01
M1=A*B; the function increments the elements
M2=B*A; from the matrix A indicated by the vector
M3 = A * B'; v')
D=I3-B*B'; B=[3 -2 -1;7 8 6;5 1 3]
det(A); v=[1 2 4 7]
det(B); disp('B(v)=abs(B(v))')
det(C); B(v)=abs(B(v))
E = A * A'; display('the function makes the absolute value'
inv(A); for the elements of the matrix A
inv(B); indicated by the vector v')
inv(C);
inv(D);
inv(E);
VP = eigen(E)