From 6853c47cdc4c87f381e1ef906a3449f3ad51e060 Mon Sep 17 00:00:00 2001 From: Albin Heimerson Date: Sun, 16 May 2021 11:37:32 +0200 Subject: [PATCH] Use nstates instead of nx in lsimplot (#508) * Use nstates instead of nx in lsimplot --- src/plotting.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plotting.jl b/src/plotting.jl index ce9f1567d..a6b38ce7a 100644 --- a/src/plotting.jl +++ b/src/plotting.jl @@ -139,7 +139,7 @@ lsimplot s2i(i,j) = LinearIndices((ny,1))[j,i] for (si,s) in enumerate(systems) s = systems[si] - y, t = lsim(s, p.args[2:end]...; x0 = x0 == 0 ? zeros(s.nx) : x0) + y, t = lsim(s, p.args[2:end]...; x0 = x0 == 0 ? zeros(nstates(s)) : x0) seriestype := iscontinuous(s) ? :path : :steppost for i=1:ny ytext = (ny > 1) ? "Amplitude to: y($i)" : "Amplitude"