www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/FillAreaBetweenContoursExample.m

    %% Fill Area Between Contours
% Create a plot that looks like a sunset by filling the area between the
% contours of
% 
% $${\rm erf}((y+2)^3) - e^{(-0.65((x-2)^2+(y-2)^2))}.$$

f = @(x,y) erf((y+2).^3) - exp(-0.65*((x-2).^2+(y-2).^2));
fcontour(f,'Fill','on');

%% 
% If you want interpolated shading instead, use the |fsurf|
% function and set its |'EdgeColor'| option to |'none'| followed by
% the command |view(0,90)|.