Search code examples
matlabmatrixnormalizationsqrt

signed square root SSR


I have a matirx within n independent vectors(in which each vector is d*1 dim), now I want to do signed square root(SSR) normalization on these vectors in MATLAB, and now I have no idea what to do. should I do sqrt on each element of each vector and then multiply it with the sign of each element?

any help is appreciated!


Solution

  • You can define your own signed square root function.

    ssr = @(x) sign(x).*abs(x).^(0.5)
    

    Note the .'s to perform element wise operations.