Académique Documents
Professionnel Documents
Culture Documents
>> %X2+3*X3=-5
>> A=[4 2 -3;-1 1 3;2 5 7];
>> %2*X1+3X2-X3=7
>> B=[1 2 3;8 7 6;5 3 1];
>> %4X1+5X2-2X3=10
>> %Les vecteurs propres et les valeurs
>> A=[0 1 -3;2 3 -1;4 5 -2];
propres de A :
>> b=[-5;7;10];
>> [U,V]=eig(A)
>> A\b
ans =
U=
-1
-0.6713 0.9163 -0.3905
4
0.6713 -0.3984 0.3905
3
-0.3144 0.0398 0.8337
>> %X1=-1 X2=4 X3=3
Exo 04 :
V=
>> t=0:2*pi/100:2*pi;
0.5949 0 0
>> y1=sin(t);
0 3.0000 0
>> y2=t;
0 0 8.4051
>> y3=t-(t.^3)/factorial(3)+(t.^5)/factorial(5)-
>> %V matrice des valeurs propres et U
(t.^7)/factorial(7);
matrice des vecteurs propres
>> plot(t,y1,'r',t,y2,'g',t,y3,'k')
2)
>> [U,V]=eig(B)
U=
V=
11.8655 0 0
0 -2.8655 0
0 0 0.0000
>> hold on
>> plot(t,y1,'r')
>> plot(t,y2,'g')
>> plot(t,y3,'k')
>> plot(t,y3,'r')
>> plot(t,y3,'k')
>> line(t,y1)
>> line(t,y2)
>> line(t,y3)
Exo 05 :
>> %a)
>> %0.12065X1+0.98775X2=2.01045
>> %0.12032X1+0.98755X2=2.00555
>> b=[2.01045;2.00555];
>> A\b
ans =
14.7034
0.2394
>> %b)
>> %0.12065X1+0.98775X2=2.01145
>> %0.12032X1+0.98755X2=2.00555
>> b=[2.01145;2.00555];
Exo>>
06 :
A\b >> %la courbe de fonction polynomiale :
y=x^4+x²-1 entre x=-2etx=2 avec n=50
a) ans =
>> fplot('polyval([1 0 1 0 -1],x)',[-2,2]),grid
p=[1 17.9753
4 4 1 4 4];
>> xlabel('GRAPHE DE LA FCT POLY
>> polyval(p,-1:0.1:1)
-0.1592 P(x)=x^4+x^2-1')
ans>>
= %X1=17.9753 X2=-0.1592 Exo 08 :
%F(x)=0 si x<0
% x si 0<=x<=1
0 0.3279 0.7027 1.1103 1.5366 % 2-x si 1<x<=2
% 0 si x>2
>> roots(Px) %En utilisant la commande plot
0.7869 + 0.6435i
Exo 11 : Exp 13 :
V1=input('V1=');
%1.boucle pour créer le vecteur v V2=input('V2=');
for i=1:100 V3=input('V3=');
v(i)= 2*pi*(i-1)/99; R1=input('R1=');
end R2=input('R2=');
disp(v); R3=input('R3=');
%2. tracé de y= cos^2(x) R4=input('R4=');
figure(1) R5=input('R5=');
y=cos(v); R6=input('R6=');
y=y.^2; R7=input('R7=');
plot(v,y) R8=input('R8=');
E Exo 15 : Fx=prime(1)
i0=2e-4; Fx =
k=1.38e-23;
q=1.602e-19; -295.4313
vd=-0.2:0.01:0.25;
t_f=[75 200 400 ] ; Fy=prime(2)
for j=1:3
t_k=(5/9)*(t_f(j)-32)+273.15; Fy =
id=i0.*(exp((q*vd)/(k*t_k))-
1);
-579.3144
> legend('Fon','Fom',2) Exo 19 :