For a state space equation in which matrix A
is dependent on variable t
(time), how can I get the step or output response?
This is the code, which doesn't work:
A = [sin(t) 0;0 cos(t)];
B = [0.5; 0.0];
C = [1 0; 0 1];
G = ss(A,B,C,[]);
step(G,t)
x0 = [-1;0;2];
initial(G,x0)
Here are error message:
Error using horzcat Dimensions of matrices being concatenated are not consistent.
Error in Response (line 11) A = [sin(t) 0;0 cos(t)];