I have A,B,C,D matrices at state space.And I want to get
transfer function using them with ss2tf function.But the
problem is that matrices are symbolic.So MATLAB gives an
error.My code and error are :
_________________________________________
a=sym('a'); b=sym('b');
A=sym([-a 1; -b 0])
B=sym([a ; b])
C=sym([1 0]);
D=sym([0]);
[num,den]=ss2tf(A,B,C,D)
??? The following error occurred converting from sym to
double:
Error using ==> sym.double at 25
DOUBLE cannot convert the input expression into a double
array.
If the input expression contains a symbolic variable, use
the VPA function instead.
Error in ==> ss2tf at 52
num(i,:) = poly(a-b*c(i,:)) + (d(i) - 1) * den;
>>
______________________________________________________
I want to get a symbolic transfer function including "a"
and "b" variables.But I can't achieve as you see.
I wonder if somebody can solve my problem.
Have a nice day.