Professional Documents
Culture Documents
MATLAB
Parte 5
10 Equaes diferenciais ordinrias
function xp = LPriOrd(t,x);
u = 0;
xp = -3*x + u;
function xp = NLPriOrd(t,x);
u = 0;
xp = u - 2*sqrt(x);
function xp = LSegOrd(t,x);
u = 1;
xp = [0 1; -4 -2]*x + [0; 4]*u;
subplot(212);
plot(t,x(:,2)); grid on
xlabel('t [s]'); ylabel('x_2(t)')
1.5
1
x (t)
1
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
t [s]
1.5
1
x (t)
0.5
2
-0.5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
t [s]