[SciPy-user] lsim changes shape of input u

Ryan Krauss ryanlists at gmail.com
Tue Sep 19 19:50:20 EDT 2006


Thanks.  I was hoping to learn from your fix, but I don't see what is
different in the code.   It looks like you fixed lsim2 as well.

Thanks,

Ryan

In [2]: shape(u)
Out[2]: (1000,)

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

In [4]: shape(u)
Out[4]: (1000,)

In [5]: Y=signal.lsim2(sys3,u,t)

In [6]: shape(u)
Out[6]: (1000,)


On 9/19/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> On Tue, Sep 19, 2006 at 05:56:19PM -0500, Ryan Krauss wrote:
> > 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?
>
> Fixed in SVN.
>
> Cheers
> Stéfan
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>



More information about the SciPy-User mailing list