www.gusucode.com > symbolic 源码程序 matlab案例代码 > symbolic/EzcontourPlotTheContourLinesOfASymbolicExpressionExample.m

    %% Plot the Contour Lines of a Symbolic Expression
%% 1

% Copyright 2015 The MathWorks, Inc.

syms x y
f = 3*(1-x)^2*exp(-(x^2)-(y+1)^2)... 
   - 10*(x/5 - x^3 - y^5)*exp(-x^2-y^2)... 
   - 1/3*exp(-(x+1)^2 - y^2);
%% 2
ezcontour(f,[-3,3],49)