help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

for i=1:bignum, x(a(i)) += y(i); end


From: Etienne Grossmann
Subject: for i=1:bignum, x(a(i)) += y(i); end
Date: Wed, 18 May 2005 14:39:14 -0400
User-agent: Mutt/1.4.2.1i


  Hi All,

has anyone written an oct-file for this?

  for i=1:bignum, x(a(i)) += y(i); end
 
I'm looking for the fastest way of doing it.

  x += full(sparse(1,a,y,1,length(x)))

will do, but in my case, a is uint16, and y needs to be reshaped,
which makes things slightly worse.

  Thx in advance,

  Etienne

-- 
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]