0% found this document useful (0 votes)
13 views

Matlab TP

Uploaded by

angolmaba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Matlab TP

Uploaded by

angolmaba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

COMMANDES OPERATIONS COMMENTAIRES

plot(0:0.01:1,0:0.01:1)

>> t=0:0.1:10;
>> plot(t,ones(size(t)))

plot(0:0.1:10,sin(0:0.1:10))

>> t=0.03*[0:100];
>> plot(t,expo(-t),'r-');

>> t=0:0.01:5;
>> plot(t,exp(-
t).*sin(2*pi*t));
>> grid

t=0:0.01:6;
>> plot(t,t,'b',t,t-
ones(size(t))+exp(-t),'r--');
>> legend('rampe','rampe
amortie')

>> t=0:0.01:6;
>> plot(t,t,'b',t,t-
ones(size(t))+exp(-t),'r--');
>> legend('rampe','rampe
amortie')
>> grid
>> echo on
>> t=0:0.2:5;
>> stem(t,exp(-
t).*sin(2*t),'fill');
>> grid

>> echo on
>> t=0:0.2:5;
>> stem(t,exp(-
t).*sin(2*t),'fill');
>> grid
>> gtext('exp(-
t)*sin(2*t),T=0.2 seconde')

>> t=0:.2:5;
>> stairs(t,exp(-
t).*sin(2*t));
>> grid

>> t=0:0.2:5;
>> f=exp(-t).*sin(2*t);
>> hold on
>>
stem(t,0.1*fix(f/.1),'fill');
>> stairs(t,f);
>> grid
>> G1=tf([1 2],[1 3 0]) G1 =

s+2
---------
s^2 + 3 s

Continuous-time transfer
function.

>> Te=1; G2 =
>> G2=tf([1 0.5],[1 -
0.2],Te) z + 0.5
-------
z - 0.2

Sample time: 1 seconds

>> G3=zpk([-2],[-3 0],5)


G3 =

5 (s+2)
-------
s (s+3)

Continuous-time
zero/pole/gain model.

>> F1=c2d(G1,Te,'zoh')
F1 =

0.7722 z - 0.1388
----------------------
z^2 - 1.05 z + 0.04979

Sample time: 1 seconds


Discrete-time transfer
function.

>> syms t s ans =


>> laplace(t)
1/s^2

>> laplace(t^2)
ans =

2/s^3

>> laplace(exp(-2*t)) ans =

1/(s + 2)

>> ilaplace(1/(1+2*s)) ans =

exp(-t/2)/2
>> ilaplace(1/s) ans =

>> ilaplace(1/(s*s))
ans =

>> syms n z ans =


>> ztrans(n)
z/(z - 1)^2

>> ztrans(z) ans =

w/(w - 1)^2

>> iztrans(z/(z-1)) ans =

>> iztrans(2*z/((z-1)^2))
ans =

2*n

>> G=zpk([-1],[0 0],2)


G=

2 (s+1)
-------
s^2

Continuous-time
zero/pole/gain model.

>> F=c2d(G,1,'zoh') F=

3 (z-0.3333)
------------
(z-1)^2
Sample time: 1 seconds
Discrete-time zero/pole/gain
model.
>> d2c(F) ans =

2 (s+1)
-------
s^2
Continuous-time
zero/pole/gain model.
>> s=tf('s'); F11 =
>>
F11=10*(s+4)/(s*(2*s+5)*( 10 s + 40
s+3)) ---------------------
2 s^3 + 11 s^2 + 15 s

Continuous-time transfer
function.

>> T1=1;
>> Te=1; F10 =
>>
z=tf('z',Te);F10=(2*z+1)/((z 2z+1
-1)*(z-0.5)) -----------------
z^2 - 1.5 z + 0.5

Sample time: 1 seconds


Discrete-time transfer
function.

You might also like