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
{{ message }}
Repository navigation
Can't get a decent output with step_response. #473
plt.plot expects the output in a different shape. You provide a list of two arrays with shape (10,), but it is casted by matplotlib into the wrong 2D array representing 10 curves with data from shape (2, ) each. Try to separate the time vector and response time series into different variables and call plt.plot with 2 parameters. Getting used to that will help you when you deal with systems with more than one output, where you have a time vector of length n and a response of (m, n): https://python-control.readthedocs.io/en/latest/conventions.html#time-series-data applies.
General note: It is not wrong to ask questions here, but this is the issue tracker for the source code. There are other platforms like StackOverflow which might be better suited for questions about matplotlib, numpy or Python programming in general. Try to follow a matplotlib or numpy tutorial for the basic concepts.
Activity
bnavigator commentedon Dec 15, 2020
plt.plotexpects the output in a different shape. You provide a list of two arrays with shape(10,), but it is casted by matplotlib into the wrong 2D array representing 10 curves with data from shape(2, )each. Try to separate the time vector and response time series into different variables and callplt.plotwith 2 parameters. Getting used to that will help you when you deal with systems with more than one output, where you have a time vector of lengthnand a response of(m, n): https://python-control.readthedocs.io/en/latest/conventions.html#time-series-data applies.General note: It is not wrong to ask questions here, but this is the issue tracker for the source code. There are other platforms like StackOverflow which might be better suited for questions about matplotlib, numpy or Python programming in general. Try to follow a matplotlib or numpy tutorial for the basic concepts.