%% Curl of 2-D Vector Field
% Specify 2-D coordinates and the vector field.

[x,y] = meshgrid(-4:4,-4:4);
Fx = -y*2;
Fy = x*2;

% Plot the vector field components Fx and Fy.

quiver(x,y,Fx,Fy)

% Find the numerical curl and angular velocity of the 2-D vector field. The values of curl and angular velocity are constant at all input coordinates.

[curlz,cav] = curl(x,y,Fx,Fy)

%
% Copyright 2020 The MathWorks, Inc.