[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how do I vectorize this?
From: |
Claudio Belotti |
Subject: |
how do I vectorize this? |
Date: |
Thu, 13 Apr 2006 17:39:21 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060126 |
Dear all,
I have a set of values z spread over an x-y plane
I want to average the values on a fixed grid (xi,yi).
I use:
xidx = lookup(xi,x)
yidx = lookup(yi,y)
zidx = sub2ind(sizeofgrid, xidx, yidx)
and then
for i=1:length(zidx)
zi( zidx(i)) += z(i)
ni( zidx(i)) += 1
endfor
zi = zi./ni
my question is: how do I vectorize the for-loop above?
cheers
Claudio
--
Claudio Belotti
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- how do I vectorize this?,
Claudio Belotti <=
- Message not available
- Re: how do I vectorize this?, Claudio Belotti, 2006/04/14
- Re: how do I vectorize this?, Miroslaw Kwasniak, 2006/04/14
- Re: how do I vectorize this?, Claudio Belotti, 2006/04/14
- Re: how do I vectorize this?, John W. Eaton, 2006/04/14
- Re: how do I vectorize this?, Etienne Grossmann, 2006/04/14
- Re: how do I vectorize this?, Claudio Belotti, 2006/04/14