黛丽雅培培
2024-05-28 17:27:50
最佳回答
1命令行键入: % define the meshx = 0:0.16:5;y = 0:0.16:5;[xx,yy] = meshgrid(x,y); % the plotzz = xx.^yy-yy.^xx;h = surf(x,y,zz); % set the properties of the ploth.edgecolor = [0.7 0.7 0.7];view(20,50);colormap(hsv);title('z = x^y-y^x');xlabel('x');ylabel('y');hold on;2按“enter”键。如图1所示。3命令行键入: c = contourc(x,y,zz,[0 0]);l**t1len = c(2,1);xcontour = [c(1,2:1+l**t1len) nan c(1,3+l**t1len:size(c,2))];ycontour = [c(2,2:1+l**t1len) nan c(2,3+l**t1len:size(c,2))];% note that the nan above prevents the end of the first contour line from being% connected to the beginning of the second lineline(xcontour,ycontour,'color','k');4按“enter”键。如图2所示。5命令行键入: plot([0:5 2 4],[0:5 4 2],'r.','markersize',25);6按“enter”键。如图3所示。7命令行键入: e = exp(1);plot([e pi],[pi e],'r.','markersize',25);plot([e pi],[pi e],'y.','markersize',10);text(e,3.3,'(e,pi)','color','k', ... 'horizontalalignment','left','verticalalignment','bottom');text(3.3,e,'(pi,e)','color','k','horizontalalignment','left',... 'verticalalignment','bottom');hold off;8按“enter”键。如图4所示。9命令行键入: e = exp(1);e^pipi^e10按“enter”键。如图5所示。end 20210311