Skip to content

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

@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)

import control as ct
import numpy as np

num = [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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy