function f=tf2sym(g) %This function transform tranfer function to sym form function. %g(s)-->f(x) %-------------------------------------------------------|% %|(C)2005 Bui Trung Hieu |% %|Website: www.khvt.com |% %|Email: matlab@khvt.com |% %-------------------------------------------------------|% exponent=g.iodelay; [z,p,fac]=zpkdata(g,'v'); f=sym('1'); syms x k=1; while(k<=length(z)) f=f*(x-z(k)); k=k+1; end k=1; while(k<=length(p)) f=f/(x-p(k)); k=k+1; end f=f*fac*exp(-exponent*x); %%End function