% Online source www.appliedmathematics.info/software/mfiles/dotproduct.m
% Online user guide www.appliedmathematics.info/software/mfiles/GEOM_m.htm

% function dotproduct: Returns the dot product of two vectors (2D or 3D).
function dotproduct=dotproduct(veca, vecb)
    vec = veca.*vecb;
    dotproduct=sum(vec);
end 