function plotsurface(fn,int1,int2) %plots a sruface defined by the function (represented by a string) fn over intervals x in int1 and y in int2 x=int1(1)+.025*(int1(2)-int1(1))*(0:40); y=int2(1)+.02*(int2(2)-int2(1))*(0:50); z=[]; for i=1:41 z=[z ;eval(strcat(fn,'(x(i),y)'))]; end surf(x,y,z') figure contour(x,y,z')