function [xvals yvals]=EulerMethod(f,xmin,xmax,steps,y0)
	 % calculate the step size
	 h=(xmax-xmin)/steps;
	 % now set up a list of x values
	 % need the list to have steps+1 numbers in it
	 % because the initial x is counted as 1
	 xvals=linspace(xmin,xmax,steps+1); 
	 x=xmin;
	 % initialize y and yvals
	 y=y0;
	 yvals=[y];
	 % now the main for loop to build the yvals
	 for i=1:steps
	     % x and y have values stored in them
	     % use these values to find slope
	     slope=f(x,y);
	     % now find the next y value
	     y=y+slope*h;
	     % and add it to the list of yvals
	     yvals=[yvals y];
	     % update x
	     x=xvals(i+1);
	 end
end
