clear all; close all;
A = [0 1;-6 -5];
b = [0;1];
c = [1 0;0 1];
d = [0;0];
sysP = ss(A,b,c,d);
eig(A)
t = 0:0.01:10;
t1 = size(t); tt = t1(:,2);
u = ones(1,tt);
x0 = [1;0];
x00 = [0;0];
y = lsim(sysP,u,t,x0);
y_0 = lsim(sysP,u,t,x00);
figure(1)
plot(t,y(:,1),'-b',t,y(:,2),'-r');
xlim([0 10]);
ylim([-1.0 1.0]);
grid;
xlabel('time t[s]');
ylabel('y(t)');
legend('x_1(t)','x_2(t)');
figure(2)
plot(t,y_0(:,1),'-b',t,y_0(:,2),'-r');
xlim([0 10]);
ylim([-1.0 1.0]);
grid;
xlabel('time t[s]');
ylabel('x_1(t),x_2(t)');
legend('x_1(t)','x_2(t)');
ans =
-2.0000
-3.0000