Repository navigation
Can't get a decent output with step_response. #563
|
I have a question. Here i have a problem with plotting step response. My graphic looks like this and i have no idea whats wrong here. |
Replies: 1 comment
|
|
|
I have a question. Here i have a problem with plotting step response. My graphic looks like this and i have no idea whats wrong here. |
|
|
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.Edit: now moved…