diff --git a/src/types.jl b/src/types.jl index b0c3a898..1b00c96b 100644 --- a/src/types.jl +++ b/src/types.jl @@ -163,6 +163,7 @@ iddata(res::ControlSystemsBase.SimResult) = iddata(res.y, res.u, res.t[2]-res.t[ output(d::AbstractIdData) = d.y input(d::AbstractIdData) = d.u +input(d::OutputData) = fill(eltype(d.y)[], length(d)) # Return empty input array LowLevelParticleFilters.state(d::AbstractIdData) = d.x output(d::AbstractArray) = d input(d::AbstractArray) = d diff --git a/test/test_iddata.jl b/test/test_iddata.jl index 2d8a255a..9abb158f 100644 --- a/test/test_iddata.jl +++ b/test/test_iddata.jl @@ -7,6 +7,7 @@ using ControlSystemIdentification: Sec @test d isa ControlSystemIdentification.OutputData @test length(d) == T @test output(d) == y + @test length(input(d)) == T @test !hasinput(d) @test ControlSystemIdentification.time2(y) == y @test sampletime(d) == 1