|Re: Is there a command to total all matrix elements?|
Message #4 Posted by allen on 26 Feb 2007, 8:25 p.m.,
in response to message #3 by John Keith
Right you are, your method is at least twice as fast as the method I posted above. My original response was much closer to your objobj method, but I revised it because it did not address the question.
Reuben's question had "opportunities for learning" in programming (trying to sum a list by +,+,+,+,+,+,+) and in mathematics (not knowing that the DOT product already does sum the elements in a vector/matrix). So I thought it more fitting to address only the mathematics issue, hoping that he would take some initiave and figure out the rest. (e.g. a simpler, faster, better... way)
Edited: 26 Feb 2007, 11:49 p.m.