Is there any function for calculating the size of a position vector in matlab?

6 ビュー (過去 30 日間)
Reza Partovi
Reza Partovi 2019 年 2 月 27 日
回答済み: Kevin Phung 2019 年 2 月 27 日
I have a vetor like (x,y,z) which is showing a point in the space. The size of this vector is sqrt(x^2+y^2+z^2). Is there any function for this in matlab?

回答 (1 件)

Kevin Phung
Kevin Phung 2019 年 2 月 27 日
use the norm() function.
example:
norm([1 2 3])
ans =
3.7417

カテゴリ

Help Center および File ExchangeNaNs についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by