Asked by Philosophaie
on 5 Sep 2013

syms x y z

r = [x y z]

rmag???

rmag should equal (x^2 + y^2 + z^2)^0.5

Answer by Shashank Prasanna
on 5 Sep 2013

Edited by MathWorks Support Team
on 22 May 2019

Accepted Answer

This works perfectly fine on MATLAB R2013a:

>> syms x y z

r = [x y z];

norm(r)

Shashank Prasanna
on 5 Sep 2013

What version of MATLAB are you using? Can you confirm that you see the file when you run this:

>> which sym/norm

Bhuvana Krishnaraj
on 3 Jun 2019

2015.a version >>which sym/nom C:\matlab\toolbox\symbolic\@!sym\norm.m

Sign in to comment.

Answer by Tariq Shajahan
on 11 May 2015

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 4 Comments

## Azzi Abdelmalek (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/86434-magnitude-of-a-vector#comment_167494

## Philosophaie (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/86434-magnitude-of-a-vector#comment_167499

## Prashant C (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/86434-magnitude-of-a-vector#comment_289762

## Abdullraheem Diab (view profile)

## Direct link to this comment

https://de.mathworks.com/matlabcentral/answers/86434-magnitude-of-a-vector#comment_719921

Sign in to comment.