size of surfnorm vectors

2 ビュー (過去 30 日間)
lorenzo donadio
lorenzo donadio 2016 年 11 月 6 日
コメント済み: lorenzo donadio 2016 年 11 月 8 日
how can I introduce a max length to the vectors plotted by surfnorm or at least scale them?, I cant finde the rigth documentation to do it, thanks.
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 11 月 7 日
The vectors produced by surfnorm are not normalized. That is, they are not unit vectors, do not generally have length 1.
lorenzo donadio
lorenzo donadio 2016 年 11 月 8 日
what I need is that vectors plotted by quiver or surfnorm to not have a length greater than a maximum value, but i dont want vectors smaller than that value to be scaled, is that possible?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 11 月 7 日
With normalizing:
[nx, ny, nz] = surfnorm(x, y, z);
L = sqrt(nx.^2 + ny.^2 + nz.^2);
quiver3( x, y, z, nx./L, ny./L, nz./L )
  1 件のコメント
lorenzo donadio
lorenzo donadio 2016 年 11 月 8 日
編集済み: lorenzo donadio 2016 年 11 月 8 日
thanks that's very helpful, but i need vectors plotted by quiver or surfnorm to not have a length greater than a maximum value, but i dont want vectors smaller than that value to be scaled

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by