Code covered by the BSD License  

Highlights from
Toolbox diffc

image thumbnail
from Toolbox diffc by Gabriel Peyre
A toolbox to perform differential calculus on a matrix.

prod_vf_vf(v1,v2)
function s = prod_vf_vf(v1,v2)

% prod_vf_vf - compute the dot product of 2 vector field.
%
%   s = prod_vf_vf(v1,v2);
%
%   The result is the scalar field defined by pointwise dot product.
%
%   Copyright (c) 2004 Gabriel Peyr


s = sum(v1.*v2, 3);

Contact us at files@mathworks.com