help-octave
[Top][All Lists]
Advanced

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

A faster sum


From: Keith Goodman
Subject: A faster sum
Date: Sat, 21 May 2005 07:35:33 -0700

Matrix multiplication is sometimes a lot faster than matrix addition.
So instead of sum(x,1) and sum(x,2) you can use ones(1,size(x,1))*x
and x*ones(size(x,2),1).

What are the pros and cons of using this method for 2D matrices in
Octave's built-in sum function?



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