syms x;e=0.001;a=-2;b=1;f(x)=(2.*x-1).*sin(pi.*x);Pn10(x)=taylor(f,'order',10);xMin = a; xMax = b; stepSize = 0.01;x = xMin:stepSize:xMax ;terms=children(Pn10);for i=1:10 y=terms(i); [val,idx] = max(y) ; ans1=vpa(val,5) if ans1 < e break endendi
i want to find i when Max(terms(i)<e)
Best Answer