size of surfnorm vectors

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Vector Fields 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by