size of surfnorm vectors

조회 수: 1 (최근 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 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