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

Error with ss2tf function #8

Open
kjudom opened this issue Apr 23, 2021 · 1 comment
Open

Error with ss2tf function #8

kjudom opened this issue Apr 23, 2021 · 1 comment

Comments

@kjudom
Copy link

kjudom commented Apr 23, 2021

I got this error when trying to convert the model back to TF with these statements:

g1 <- tf(10,c(1,6,5,0))
s1 <- tf2ss(g1)
ss2tf(s1)

y1:Error in poly2str(argnum, svar = "s", smul = " ") :
Argument 'p' must be a numeric vector.

@kjudom
Copy link
Author

kjudom commented Apr 23, 2021

by the way, this should be some floating point rounding problem since changing the numerator from 10 to 2 gives the following:

g1 <- tf(2,c(1,6,5,0))
s1 <- tf2ss(g1)
ss2tf(s1)

y1:
-3.552714e-15 s^2 - 1.776357e-15 s + 2


                 s^3 + 6 s^2 + 5 s 

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

1 participant