Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

IndexError: index -1 is out of bounds for axis 0 with size 0 #1014

Closed
Labels
Milestone
@NikolaiVChr

Description

@NikolaiVChr

I get this:

Traceback (most recent call last):  File "C:\Users\me\PycharmProjects\f\control1.py", line 17, in <module>    S = ct.step_info(sysdata=y_out2, T=T2)  File "C:\Users\me\PycharmProjects\f\venv\lib\site-packages\control\timeresp.py", line 1614, in step_info    settled = np.where(IndexError: index -1 is out of bounds for axis 0 with size 0

From this: (just a simple integrator TF)

importcontrolasctimportnumpyasnpnum= [0,5]den= [1,0]H=ct.TransferFunction(num,den)t=np.arange(start=0,stop=2,step=1/120)T2,y_out2=ct.timeresp.impulse_response(sys=H,T=t)pyplot.figure(1)pyplot.plot(T2,y_out2)pyplot.grid(True)pyplot.show(block=False)S=ct.step_info(sysdata=y_out2,T=T2)pyplot.show()

Control v0.10.0
Numpy 1.26.4
Scipy 1.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp