-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a vector of both continuous and discrete #665
Labels
v1
Issues to resolve before releasing v1
Comments
baggepinnen
changed the title
Plotting continuous and discrete in same plot
Building a vector of both continuous and discrete
Mar 8, 2022
The problem is not the plot, it's the creation of the vector julia> G = tf([0.1, 0], [0.1, 1]);
julia> H = c2d(G, 0.01, :fwdeuler);
julia> [G, H]
ERROR: Sampling time mismatch
Stacktrace:
[1] promote_rule(#unused#::Type{Discrete{Float64}}, #unused#::Type{Continuous})
@ ControlSystems ~/.julia/dev/ControlSystems/src/types/TimeEvolution.jl:31
[2] promote_type
@ ./promotion.jl:289 [inlined]
[3] promote_rule(#unused#::Type{TransferFunction{Continuous, ControlSystems.SisoRational{Float64}}}, #unused#::Type{TransferFunction{Discrete{Float64}, ControlSystems.SisoRational{Float64}}})
@ ControlSystems ~/.julia/dev/ControlSystems/src/types/promotion.jl:36
[4] promote_type
@ ./promotion.jl:289 [inlined]
[5] promote_typeof(x::TransferFunction{Continuous, ControlSystems.SisoRational{Float64}}, xs::TransferFunction{Discrete{Float64}, ControlSystems.SisoRational{Float64}})
@ Base ./promotion.jl:330
[6] vect(::TransferFunction{Continuous, ControlSystems.SisoRational{Float64}}, ::Vararg{Any})
@ Base ./array.jl:144
[7] top-level scope
@ REPL[12]:1 The following works julia> TransferFunction[G, H]
2-element Vector{TransferFunction}: |
I have also been bothered by our handling of of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Noticed that plotting by sending in a vector of plots does not seem to work when there is a mix of discrete and continuous, but when sending them in one by one it works nicely. Have not looked into it at all, just felt it should probably be possible to do, so thought I could put it up here.
The text was updated successfully, but these errors were encountered: