| Satyagopal Mandal |
| Department of Mathematics |
| Office: 624 Snow Hall Phone: 785-864-5180 |
| function z=z(n,t0,t1,y0) |
| h=(t1-t0)/n; |
| t(1)=t0; |
| z(1)=y0; |
| for i=1:n |
| t(i+1)=t(i)+h; |
| z(i+1)=z(i)+((ex(t(i),z(i))+ex(t(i+1),z(i)+h*ex(t(i),z(i))))*h)/2; |
| end; |
| IE=[t',z'] |
| plot(t,z) |
| title('satya') |
| %x is a function of t and y is the first derivative x'(t) |
| function y=y(t,x) |
| y=(t^2-x^2)*sin (x); |