Professional Documents
Culture Documents
Codigo 3.2
Codigo 3.2
% The divergence of A
% e.g. diff(A(2), z) means the derivative of the
% y-component of vector A with respect to z
divA=diff(A(1),x)+...
diff(A(2),x)+...
diff(A(3),x)+...
% evualuate divergence at point (x,y,z) = (1, -2, 3)
subs(divA,{x,y,z},{1, -2, 3})
% The curl of A
% e.g. diff(A(2),z) means the derivative of the
% y-component of vector A with respect to z
curlA=[diff(A(3),y)-diff(A(2),z),...
-diff(A(3),x)+diff(A(1),z),...
diff(A(2),x)-diff(A(1),y)]
% evaulate curl at point (x,y,z) = (1, -2, 3)
subs(curlA,{x,y,z},{1, -2, 3})