function s=sprojection(u,v) 
% Scalar projection of the vector u along the vector v. 
%
% Syntax: s=sprojection(u,v) 
%
% Input:   u,v - two 1x3 vectors 
% Output:  s   - a scalar

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

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

