% find the coefficient of each order of x in a polynomial f
function a=symcf(f,x)
i=1;
f1=f;
while(f1~=0)
a(i)=subs(f1,x,0)/factorial(i-1);
i=i+1;
f1=diff(f1,x);
end