function [vector] = NormVeclen(vector)
    % NormVeclen ignores elements with a value of NoSyn indicating a missing value e.g. synapse
    N = length(vector);
    NoSyn = -0.001;
    sumsq = 0;
    for s = 1 : N
        if vector(s) ~= NoSyn
            sumsq = sumsq + vector(s) * vector(s);
        end
    end
    scale = sqrt(sumsq);
    for s = 1 : N
        if vector(s) ~= NoSyn
            vector(s) = vector(s) / scale;
        end
    end
end
