How can I calculate the magnitude of n-dimensional vector by Matlab's commands?
Show older comments
Is there any specific command for calculating the magnitude of n-dimensional vector?
1 Comment
Star Strider
on 21 Oct 2012
What do you mean by magnitude?
By definition, a vector has only one dimension.
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 21 Oct 2012
v=[2 3 4 5]
ampv=sqrt(v.^2)
1 Comment
pratyusha adiraju
on 6 Sep 2016
Edited: pratyusha adiraju
on 6 Sep 2016
magnitude calculation procedure is r = [x y z]
rmag = (x^2 + y^2 + z^2)^0.5
so in matlab rmag =sqrt(sum(r.^2))
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!