MATLAB: Size of surfnorm vectors

surfnorm

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.

Best Answer

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 )
Related Question