Reputation:
How could I initialize x at time 2013? I need x0= 0.9914 as initial conditions Here my example:
A=[1]
B=[0.12]
C=[1]
D=[0]
u=[12.9 13 13.01 13.02 13.019 13.03 13.03]
sistema=ss(A,B,C,D,-1)
t=[2013 2014 2015 2016 2017 2018 2019];
y=lsim(sistema,u,t);
plot(t,y)
Upvotes: 0
Views: 43
Reputation: 2337
Seems like you forgot to create the initial conditions variable.
x0 = 0.9914;
Then all you need to do is add it to the lsim
function.
y=lsim(sistema, u, t, x0);
Upvotes: 1