From: Budding MATLAB Jockey on
Hi I have a little for loop that goes through and sets values from a quiver to 0 if they are less than a threshold

but there are dots where i put zeros, how can I make nothing show up there?
ie/ there would be arrows where values are large but nothing where values are small.

I tried 'MarkerFaceColor', 'none', 'MarkerEdgeColor', 'none' and setting values to nan instead of 0 but didnt work

Matlab 2009b
From: Ulf Graewe on
"Budding MATLAB Jockey " <chico1st(a)hotmail.com> wrote in message <hq1udn$ckh$1(a)fred.mathworks.com>...
> Hi I have a little for loop that goes through and sets values from a quiver to 0 if they are less than a threshold
>
> but there are dots where i put zeros, how can I make nothing show up there?
> ie/ there would be arrows where values are large but nothing where values are small.
>
> I tried 'MarkerFaceColor', 'none', 'MarkerEdgeColor', 'none' and setting values to nan instead of 0 but didnt work
>
> Matlab 2009b

try this:

N=30;
[x,y] = meshgrid(1:N);
[dx,dy] = gradient(peaks(N));
figure
quiver(x,y,dx,dy)

figure
% to remove the arrows, set the position to nan
val=0; % the threshold
x(dx<val) = nan;
quiver(x,y,dx,dy)

Hope that helps!
 | 
Pages: 1
Prev: Lagrangian Relaxation
Next: data fit