does anyone know how to calculate the magnitude of a vector in matlab? thanks
Last edited by saha01; December 5th 2009 at 03:47 AM.
Follow Math Help Forum on Facebook and Google+
Originally Posted by saha01 does anyone know how to calculate the magnitude of a vector in matlab? thanks If its a row vector Code: sqrt(x*x') if a column vector Code: sqrt(x'*x) If you don't want to worry about what sort of vector: Code: sqrt(sum(x.^2)) CB
sqrt(x*x')
sqrt(x'*x)
sqrt(sum(x.^2))
View Tag Cloud