How to find the magnitude of a vector in Matlab