Commit 7cc0e37a authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

update constructor

parent 74ed2f01
......@@ -37,13 +37,13 @@ mutable struct SimpleLTVModel{T} <: LTVStateSpaceModel
At::Array{T,3}
Bt::Array{T,3}
extended::Bool
function SimpleLTVModel{T}(At::Array{T,3},Bt::Array{T,3},extend::Bool)
if extend
At = cat(3,At,At[:,:,end])
Bt = cat(3,Bt,Bt[:,:,end])
end
return new(At,Bt,extend)
end
function SimpleLTVModel{T}(At::Array{T,3},Bt::Array{T,3},extend::Bool)
if extend
At = cat(3,At,At[:,:,end])
Bt = cat(3,Bt,Bt[:,:,end])
end
return SimpleLTVModel{T}(At,Bt,extend)
end
SimpleLTVModel(At,Bt,extend::Bool) = SimpleLTVModel{eltype(At)}(At,Bt,extend)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment