12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

quiverExamples Plot the gradient field of the function z = xe( – x2 – y 2 ) .[X,Y] = meshgrid(–2:.2:2);Z = X.∗exp(–X.^2 – Y.^2);[DX,DY] = gradient(Z,.2,.2);contour(X,Y,Z)hold onquiver(X,Y,DX,DY)colormap hsvgrid offhold off21.510.50−0.5−1−1.5−2−2 −1.5 −1 −0.5 0 0.5 1 1.5 2See Alsocontour, LineSpec, plot, quiver32-381

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!