graphics - Matlab's Quiver3 plots only 4 vectors -
i want use command quiver3(x,y,z,m,n,o) in order vector field, matrices 10x10x10 arrays real entries. wanted plot , got 4 vectors instead of expected 1000. here know, possibly have done wrong? if need further information, available comments.
assuming problem occurs when attempting display data (rather attempting display unallowed numerical values such inf
or nan
), think problem range of norms of vectors, such 4 show up.
the importance of norm of vectors relative range of coordinate system important, illustrated following example:
here 10 random vectors show up:
na = 10; [x y z m n o] = deal(rand(na,1),rand(na,1),rand(na,1),rand(na,1),rand(na,1),rand(na,1)); quiver3(x,y,z,m,n,o)
but if of vectors made 100 x bigger, smaller ones show up:
mul = 1e+3; [x y z m n o] = deal(rand(na,1),rand(na,1),rand(na,1),... [mul*rand(na/2,1);rand(na/2,1)],... [mul*rand(na/2,1);rand(na/2,1)],... [mul*rand(na/2,1);rand(na/2,1)]); quiver3(x,y,z,m,n,o)
similarly if of vectors made small don't show up:
mul = 1e-3; [x y z m n o] = deal(rand(na,1),rand(na,1),rand(na,1),... [mul*rand(na/2,1);rand(na/2,1)],... [mul*rand(na/2,1);rand(na/2,1)],... [mul*rand(na/2,1);rand(na/2,1)]); quiver3(x,y,z,m,n,o)
vectors large or small relative axis not displayed @ all.
if problem scaling may want inspect function , see how narrow range of x,y,z vectors have narrower range of values, or change scale (logarithm?) data can displayed in 1 figure.
edit
as alternative question of how display data, may want consider using isosurfaces
. here's example, each red sphere representing different isosurface in spherical potential:
Comments
Post a Comment