function out=curl(vec,var)
%CURL evaluates the curl of the vector field vec (the first argument)
% with respect to the variables var (the second argument).  Usually
% you should declare x, y, z to be symbolic variables and take
% var to be [x, y, z]. vec should be a 3-dimensional vector function of
% x, y, and z.  Example: curl([0, x, 0], [x,y,z]) gives [0, 0, 1]
out=[diff(vec(3),var(2))- diff(vec(2),var(3)),diff(vec(1),var(3))-diff(vec(3),var(1)),diff(vec(2),var(1))-diff(vec(1),var(2))];


