[SciPy-user] lsim changes shape of input u

Ryan Krauss ryanlists at gmail.com
Tue Sep 19 17:56:19 CDT 2006

signal.lsim is changing my input vector u from 1D to 2D:
In [5]: shape(u)
Out[5]: (1000,)

In [6]: Y=signal.lsim(sys3,u,t)

In [7]: shape(u)
Out[7]: (1000, 1)

I tried adding a U=squeeze(U) just before the return of lsim, but this
didn't seem to fix the problem.  This is causing errors else wher in
my code when I try to export matrices that are columns of data, so I
have lots of u=squeeze(u) sprinkled through out my code.  Is there a
way to make lsim do this so that I don't have to do it all the time?



More information about the SciPy-user mailing list