size of surfnorm vectors

1 vue (au cours des 30 derniers jours)
lorenzo donadio
lorenzo donadio le 6 Nov 2016
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 commentaires
Walter Roberson
Walter Roberson le 7 Nov 2016
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 le 8 Nov 2016
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?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 7 Nov 2016
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 commentaire
lorenzo donadio
lorenzo donadio le 8 Nov 2016
Modifié(e) : lorenzo donadio le 8 Nov 2016
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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Vector Fields dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by