image thumbnail

MATLAB Plot Gallery - Function Contour Plot

by

 

24 Feb 2012 (Updated )

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.

For more examples, 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