Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
References: <j3e342$dbb$1@newscl01ah.mathworks.com> <j3eb5j$52j$1@newscl01ah.mathworks.com> <j3eimp$op4$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1314577030 3707 172.30.248.47 (29 Aug 2011 00:17:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Aug 2011 00:17:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com 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

 mtimesx(w,'T',t)

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