```Date: Dec 3, 2012 7:28 AM
Author: faizal
Subject: Midpoint Method

clcclear allclcfprintf('Comparing Exact Solution and Midpoint Method\n')fcnstr='x^2 - 3*x^3 + 0.5*x^4' ;% Initial value of xx0=0;% Initial value of yy0=1;% Final value of yxf=4;% number of steps to go from x0 to xf.% This determines step size h=(xf-x0)/nn=8;%Converting the input function to that can be usedf=inline(fcnstr) ;% Exact Solutionsyms xeqn=['Dy=' fcnstr]% exact solution of the odeexact_solution=dsolve(eqn,'y(0)=0','x')% geting points for plotting the exact solutionxx=x0:(xf-x0)/100:xf;yy=subs(exact_solution,x,xx);yexact=subs(exact_solution,x,xf);plot(xx,yy,'.')hold on%Midpoint Methodh=(xf-x0)/n;a1=0;a2=1;p1=1/2;q11=1/2;%Initial values of x and yxr(1)=x0;yr(1)=y0;for i=1:n    ka=f(xr(i),yr(i));    kb=f(xr(i)+p1*h,yr(i)+q11*ka*h);    yr(i+1)=yr(i)+(a1*ka+a2*kb)*h;    xr(i+1)=xr(i)+h;end%Value of y at x=xfy_improved=yr(n+1);% Absolute relative true error for value using Midpoint Methodet_improved=abs((y_improved-yexact)/yexact)*100;hold onplot(xr,yr,'color','red','LineWidth',2)fprintf('\nAt x = %g ',xf)disp(' ')disp('_________________________________________________________________')disp('Method Value Absolute Relative True Error')disp('_________________________________________________________________')fprintf('\nExact Solution %g',yexact)fprintf('\nMidpoint method %g %g ',y_improved,et_improved)disp( ' ')this code i edited and try to run it like this,but it keeps on showing "??? Error using ==> inline.subsref at 17Too many inputs to inline function.Error in ==> Untitled18 at 47    ka=f(xr(i),yr(i));"Mind to explain to me what the probelm here...i'm a newbie using Matlab
```