gusucode.com > 《matlab图像处理与界面编程宝典》秦襄培 编著,每章的MATLAB源代码程序 > 第7章/代码7-1.txt

    
clear all;               % 清空内存
close all;               % 关闭窗口
clc;                   % 英文Clear Command Window的缩写,清空命令窗口
% 上面的命令是回收MATLAB占用的系统资源,为后面的程序提供准备。
x=-10:0.1:10;
y=x;
[X,Y]=meshgrid(x,y);
Z=cos(X.^3+Y.^3);
pcolor(X,Y,Z);            % pcolor 使用色彩表现数据,和image的功能类似。
shading interp            % shading函数控制渲染效果
axis('equal','square','off')    %对轴的属性进行设置