[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quiver Matlab function
From: |
Joao Cardoso |
Subject: |
Re: Quiver Matlab function |
Date: |
Thu, 04 Feb 1999 18:49:13 +0000 |
Sara Rainieri wrote:
>
> I am a neophyte of Octave and I am trying to understand if
> there is any plot function in octave ambient equivalent to the
> ``quiver.m'' Matllab function.
> This function plots velocity vectors as arrows with component (u,v) at
> the point (x,y):
> quiver(x,y,u,v).
> I tried to execute the quiver.m Matlab file, but it didn't work.
> Thanks
> Sara
Hi, if you have plplot_octave (<http://merlin.inescn.pt/~qual>), then
-- function arrows( X, Y, dx, dy)
# arrows( X, Y, dx, dy)
# plot an array of arrows (partly emulates matlab quiver)
#
# NOTE: preliminary
of = do_fortran_indexing;do_fortran_indexing=1;
for i=1:rows(X)*columns(X)
xx = [X(i); X(i) + dx(i)];
yy = [Y(i); Y(i) + dy(i)];
plline(xx,yy);plpoin(X(i) + dx(i), Y(i) + dy(i), 20);
endfor
plflush
do_fortran_indexing = of;
endfunction
Joao Cardoso | e-mail: address@hidden
INESC, R. Jose Falcao 110 | tel: + 351 2 2094322
4050 Porto, Portugal | fax: + 351 2 2008487