加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Matlab如何绘制云图

(2016-10-26 20:58:46)
标签:

matlab

分类: MATLAB
转自:http://rejessica.blog.163.com/blog/static/18356315120122492118870/
方法一:
思路:采用surf命令,然后使用view命令调整视角,得到平面云图。
x=1:51;y=1:51;[X,Y]=meshgrid(x,y); surf(X,Y,t);colorbar % t 数据为之前所load的数据
得到结果:

 surf(X,Y,t);colorbar;xlabel('x');ylabel('y');zlabel('t');az = 0;el =- 90;view(az, el);%el=-90意味着从z轴负方向往其正方向看
得到结果:

方法二:
采用pcolor函数
pcolor(xx,yy,t);%When you use shading faceted or shading flat, the constant color of each cell is the color associated with the corner having the                 %smallest x-y coordinates. Therefore, t(i,j) determines the color of the cell in the ith row and jth column. 
                     %The last row and column of t are not used.
如果再加上
shading interp;%When you use shading interp, each cell's color results from a bilinear interpolation of the colors at its four vertices, and all elements of                      %t are used.

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有