News

Julia instructions to plot step response

Written on 05.05.2022 12:09 by Martina Maggio

As we saw today during the lecture, the newest version of the ControlSystems library in Julia does not support immediate plot of step responses. The simplest way I found to plot the signal is the following:

> using LinearAlgebra
> using ControlSystems
> using Plots
  [definition of Phi, Gamma, C, D, sampling_period]
> S = ss(Phi, Gamma, C, D, sampling_period);
> y, t, x = step(S);
> plot(t, y');

The transpose in the plot is necessary for column/row consistency.

Privacy Policy | Legal Notice
If you encounter technical problems, please contact the administrators.