function w=vprojection(u,v) 
% Vector projection of the vector u along the vector v. 
%
% Syntax: w=vprojection(u,v) 
%
% Input:   u,v - two 1x3 vectors 
% Output:  w   - a vector

vhat=v/sqrt(prick(v,v));   % normera vektorn v
w=prick(u,vhat)*vhat; 

%  vhat=v/norm(v);          % alternativ med matlabs norm
%  w=dot(u,vhat)*vhat;      % och dot 


