CS计算机代考程序代写 close all

close all

[x y] = meshgrid([-10:.1:10],[-10:.1:10]);
c = 1;
A = 5;

h = A*sin(sqrt(x.^2+y.^2+c^2))./sqrt(x.^2+y.^2+c^2);

%% Plot Contour
figure
contourf(x,y,h,[-1.5:0.5:4])
xlabel(‘x’)
ylabel(‘y’)
colorbar
% print(gcf,[‘dropC1.png’],’-dpng’);

hold on
contour(x,y,h,[-0.5 -0.5],’w’)
% print(gcf,[‘dropC2.png’],’-dpng’);

%% Plot Surf
figure
surf(x,y,h)
axis equal
shading interp

xlabel(‘x’)
ylabel(‘y’)
zlabel(‘h’)
colorbar