View
464
Download
1
Category
Preview:
Citation preview
Ministère de l’Enseignement Supérieur et de la Recherche ScientifiqueUNIVERSITE DE CARTHAGE
INSTITUT NATIONAL DES SCIENCES APPLIQUEES ET DE TECHNOLOGIEdepartement de genie phisique et instrumentation
Compte rendu
TP1 automatique échantillonné
2012-2013
IMI 4.2 G A
2
Exercice n°1 Initiation
Variables Instruction Résultats et commentaires
r=2π r=2* pi r= 6,2832
x=[r -r] r=[r -r] x= 6,2832 6,2832
Y=r ²er
−r
Y=[r² ;exp(r);-r] Y=39,4784
535,4917−6,2832
A=1 2 34 5 67 8 9
A=[1 2 3 ;4 5 6 ;7 8 9] A=1 2 34 5 67 8 9
B matrice nulle de dimension (5x3)
B=zeros(5,3) B= 0 0 0
0 0 00 0 00 0 00 0 0
C matrice des uns de dimension (2x4)
C=ones(2,4) C=1 1 111 1 11
I matrice identité de dimension (3x3)
I=eye(3)I=
1 0 00 1 00 0 1
3
Exercice n°2 Opération sur les variables
Opération instruction Résultats et remarque
A+I a+I a+i
ans =
2 2 3 4 6 6 7 8 10
A*I a*I a*i
ans =
1 2 3 4 5 6 7 8 9
I*A I*a i*a
ans =
1 2 3 4 5 6 7 8 9
A−1 Inv(a) ou a^(-1) inv(a)
ans =
-0.4504 0.9007 -0.4504 0.9007 -1.8014 0.9007 -0.4504 0.9007 -0.4504Ou biena^(-1)
ans =
-0.4504 0.9007 -0.4504 0.9007 -1.8014 0.9007 -0.4504 0.9007 -0.4504
AT Transpose(a) ou a’ transpose(a)
4
ans =
1 4 7 2 5 8 3 6 9a'
ans =
1 4 7 2 5 8 3 6 9
Exercice n°3 Etude des matrices
Opération Instruction Résultats et remarque
Déterminant(A) det(A) det(a)
ans =
6.6613e-016
Valeur propre de A « Eigen values »
eig(A) eig(a)
ans =
16.1168 -1.1168 -0.0000
Dimension de (A) size(A) size (a)
ans =
3 3
Longueur de (A) max size(A)length(A)
length(a)
ans =
3
Rang de (A) rank(A) rank(a)
ans =
2
Trace de (A) trace(A) trace(a)
5
ans =
15
Diagonaliser [3 5 7] diag([3 5 7]) 3 0 00 5 00 0 7
1 1X= 2 * X= 2 3 3
X^2X*XT
X.^2
Faux 14 1 4 9
Exercice n°4 Calcul d’équation
Soit
y=x3+2 x2−2x−1 y=[1 2 -2 -1]
y =
1 2 -2 -1
z=x+1 z=[1 1]
z = 1 1
m= z*y m=conv(z,y)
m =
1 3 0 -3 -1
m=x4+3 x3−3 x−1
Les racines de m roots(m)
ans =
-2.6180
6
1.0000
-1.0000
-0.3820
n=z / y deconv(z,y)
ans =
0
n= y / z deconv(y,z)
ans =
1 1 -3
Remarques
Y=[1 2⏟z
−2−1⏟w
]
z=y(1,1:2) w=y(1,3:4)
z = w=
1 2 1 2
A=1 2 34 5 67 8 9
B=A(2 :3,2 :3) ans =
5 6
8 9
C=A(1,2) ans =
2
7
Compteur
S=1,2,3,…..,100
s=1:100
s =
Columns 1 through 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Columns 15 through 28
15 16 17 18 19 20 21 22 23 24 25 26 27 28
Columns 29 through 42
29 30 31 32 33 34 35 36 37 38 39 40 41 42
Columns 43 through 56
43 44 45 46 47 48 49 50 51 52 53 54 55 56
Columns 57 through 70
57 58 59 60 61 62 63 64 65 66 67 68 69 70
Columns 71 through 84
71 72 73 74 75 76 77 78 79 80 81 82 83 84
Columns 85 through 98
85 86 87 88 89 90 91 92 93 94 95 96 97 98
Columns 99 through 100
99 100
p=10,01→ 100
p=1:0.1:10
p =
Columns 1 through 8
1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000
Columns 9 through 16
1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 2.4000 2.5000
Columns 17 through 24
8
2.6000 2.7000 2.8000 2.9000 3.0000 3.1000 3.2000 3.3000
Columns 25 through 32
3.4000 3.5000 3.6000 3.7000 3.8000 3.9000 4.0000 4.1000
Columns 33 through 40
4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 4.8000 4.9000
Columns 41 through 48
5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000
Columns 49 through 56
5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000
Columns 57 through 64
6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 7.2000 7.3000
Columns 65 through 72
7.4000 7.5000 7.6000 7.7000 7.8000 7.9000 8.0000 8.1000
Columns 73 through 80
8.2000 8.3000 8.4000 8.5000 8.6000 8.7000 8.8000 8.9000
Columns 81 through 88
9.0000 9.1000 9.2000 9.3000 9.4000 9.5000 9.6000 9.7000
Columns 89 through 91
9.8000 9.9000 10.0000
>>
?? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.
Exercice n°5 Définition et manipulation d’une function de transfert
1) Soit le système continu suivant :
9
E(p) => G(p) => S(p)
Tel que
s( p)e (p)
=g ( p )= p+1p ²+2 p+1
Créer un script nommé : « fonction-transfert » Définir la fonction de transfert G(p) Modifier la variable par défaut ‘s’en le variable ‘p’
2) Définir les fonctions de transfert des systèmes suivants :
f 1 ( p )= s ( p )e (p )
=g ( p )∗n( p)
F1=series(G,N)
10
f 2 ( p )= s (p)e ( p)
¿ g (p )+n( p)
F2=G+N=parallel(G,N)
f 3=s ( p)e( p)
=g (n )∗n( p)
1+g (n )∗n (p)
F3= G∗N1+G∗N
=Feedback (G , N)
Recommended