From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matlab alternative to mtimesx for this problem ?
Date: Mon, 29 Aug 2011 00:17:10 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <j3elq6$3jr$>
References: <j3e342$dbb$> <j3eb5j$52j$> <j3eimp$op4$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1314577030 3707 (29 Aug 2011 00:17:10 GMT)
NNTP-Posting-Date: Mon, 29 Aug 2011 00:17:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:741522

> This is obviously not true for all functions of w and t, and the example I gave wasn't actually the function I'm integrating, but a simpler example.
> ........
- - - - - - - - - - -
  Juliette, could you please describe very carefully the actual operation you performed that took "only 0.003245 seconds"?  As you described it at the beginning of this thread, that would represent a multiplication rate of more than 30 gigaflops even if the execution time for trapz is totally ignored.  That sounds fishy to me to say the least.  There is also the question of how trapz could possibly obtain an answer without making use of a full 4GB array.

  If I understand James Tursa's explanation of 'mtimesx', the expression


applies the transpose operation to the first ('w') argument, not the second one.  This would make it not the equivalent of the repmat and bsxfun arrays for general w and t.  If you made a similar mistake on your actual test, perhaps you somehow produced a much smaller array that only coincidentally gave you a correct (and faster) answer.

Roger Stafford