control
control copied to clipboard
Error with ss2tf function
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.
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