function [ res ] = mynorm1( V )
%MYNORM1 returns the normalized version of V
%   Returns a vector parallel to V (scalar multipple
%   but with unit norm. This is an alternative version
%   of mynorm.

N=size(V,1);  % V has to be a column vector.
S=0;
for i=1:N
    S = S + V(i)^2;
end
S = sqrt(S);
res = zeros(N,1);
for i=1:N
    res(i)=V(i)/S;
end

end

