%% Create 3-D Quiver Plot
% Define the data.

% Copyright 2015 The MathWorks, Inc.

x = -3:0.5:3;
y = -3:0.5:3;
[X,Y] = meshgrid(x, y);
Z = Y.^2 - X.^2;
[U,V,W] = surfnorm(Z);

%%
% Plot vectors with components |(U,V,W)| at points that are
% equally spaced in the _x_-direction and _y_-direction with heights
% determined by |Z|.
figure
quiver3(Z,U,V,W)
view(-35,45)

