image thumbnail

MATLAB Plot Gallery - Function Contour Plot

by

 

Create a contour plot from a function

Function_Contour_Plot

This is an example of how to create a contour plot from a function in MATLAB®.

Read about the ezcontourf function in the MATLAB® documentation.

Go to MATLAB Plot Gallery

% Create the contour plot using the function f(x,y) = sin(3*x)*cos(x+y)
figure;
ezcontourf('sin(3*x)*cos(x+y)', [0, 3, 0, 3]);

% Change the default colormap to 'spring'
colormap('spring');

Contact us