Skip to content
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

tf with symbolics does not print correctly #503

Closed
albheim opened this issue May 13, 2021 · 2 comments
Closed

tf with symbolics does not print correctly #503

albheim opened this issue May 13, 2021 · 2 comments

Comments

@albheim
Copy link
Member

albheim commented May 13, 2021

julia> L
TransferFunction{Continuous, ControlSystems.SisoRational{Sym}}
            as^2 + bs + 0
-------------------------------------
a*kp + cs^2 + a*ki + b*kp + ds + b*ki

Continuous-time transfer function model

julia> denvec(L)
1×1 Matrix{Vector{Sym}}:
 [a*kp + c, a*ki + b*kp + d, b*ki]

Printing transfer function with symbolics looks a bit weird.

@olof3
Copy link
Contributor

olof3 commented May 13, 2021

Yes, that looks pretty bad.

The problem seems to be in Polynomials, see JuliaMath/Polynomials.jl#233

mwe

using SymPy
using Polynomials
@syms a
Polynomial([a, a^2 + 1])
# prints Polynomial(a + a^2 + 1*x)

@olof3
Copy link
Contributor

olof3 commented May 13, 2021

JuliaPy/SymPy.jl#423

Hopefully this just got fixed. Haven't tried it myself though.

@albheim albheim closed this as completed Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants