
clf;
t = 0.0:0.01:1.0;
y = func(t);
[t1, y1] = eul('fun',0.0,1.0,1.0,0.05);
[t2, y2] = heun('fun',0.0,1.0,1.0,0.05);
[t3, y3] = rknew('fun',0.0,1.0,1.0,0.05);
plot(t,y,'w-.',t1,y1,'c:',t2,y2,'g-',t3,y3,'y:');
xlabel('t');
ylabel('y');
title('Comparison: Exact Solution vs. Solutions Computed by Euler & Heun Method');
