You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to simulate a system with one input, for example
using ControlSystemsBase
A = ones(3,3);
B = ones(3,1);
C = ones(1,3);
D = 0;
model = ss(A,B,C,D);
t = LinRange(0,10,100) |> Vector
u = [ones(10,1); zeros(90,1)];
modeld = c2d(model,t[2]-t[1]);
and I want to call lsim(modeld,u,t). However, this results in the error message u must be of size (nu, length(t)) and the input u needs to be transposed to be a row vector lsim(modeld,u',t).
I suggest either adding the special case of nu == 1 or improve the error message to clarify.
The text was updated successfully, but these errors were encountered:
If I want to simulate a system with one input, for example
and I want to call
lsim(modeld,u,t)
. However, this results in the error messageu must be of size (nu, length(t))
and the inputu
needs to be transposed to be a row vectorlsim(modeld,u',t)
.I suggest either adding the special case of
nu == 1
or improve the error message to clarify.The text was updated successfully, but these errors were encountered: