Gradient of scalar in 2D new

version 1.0.0 (59.6 KB) by Roche de Guzman
Comparing the filled contour plot of the scalar function to the quiver plot of its gradient vector function


Updated 18 Mar 2022

View License

Live Script showing an example of a function H in 2D space (x and y) evaluated as a filled contour plot. The gradient of H is a vector field with arrows pointing to and away from local maxima and minima, respectively, and magnitudes (relative arrow length) corresponding to the change in H with respect to change in x and y (partial derivatives).

Cite As

Roche de Guzman (2022). Gradient of scalar in 2D new (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!