0
点赞
收藏
分享

微信扫一扫

MATLAB图形绘制--等高线图

老王420 2022-06-09 阅读 76
clear all;
close all;
%contour,contourf,imagesc

x=[1:1:100];
y=[1:1:100];
z=reshape(x,[100,1]);
energe=z*y;
figure;
pcolor(x,y,energe);
shading interp;
colorbar;
colormap(hsv);
%colormap(gray);
%colormap(flipud(gray));
figure(2);
contour(x,y,energe,'ShowText','on');
colorbar;
colormap(hsv);

figure(3);
fcontour(@(x,y) sin(x)+cos(y))
hold on
fcontour(@(x,y) x-y)
hold off

​​https://zhuanlan.zhihu.com/p/359626420​​

​​https://ww2.mathworks.cn/help/matlab/ref/contour.html​​

​​https://ww2.mathworks.cn/help/matlab/ref/fcontour.html​​

​​https://ww2.mathworks.cn/help/matlab/ref/rgbplot.html​​


举报

相关推荐

0 条评论