Posts: 562
Threads: 27
Joined: Oct 2006
John,
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.