Skip to content

Commit

Permalink
Merge pull request #166 from baggepinnen/emptyu
Browse files Browse the repository at this point in the history
return empty input for `OutputData`
  • Loading branch information
baggepinnen authored Nov 28, 2024
2 parents 4b86524 + 8398659 commit e3f0463
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/test_iddata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e3f0463

Please sign in to comment.