function f =NumIntF(xi,xf) h=0.001; N=(xf-xi)/h; ii=1; while(ii<= (N+1)) if(ii==1); x(ii)=xi; y(ii)= cos(x(ii))*exp(sin(x(ii)))*h; else x(ii)=x(ii-1)+h; y(ii)=y(ii-1)+cos(x(ii))*exp(sin(x(ii)))*h; end ii=ii+1; end f= y(N+1);end
MATLAB: It follows the END that terminates the definition of the function “NumIntF” error
function
Best Answer