From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: matlab alternative to mtimesx for this problem ?
Date: Sun, 28 Aug 2011 18:58:10 +0000 (UTC)
Organization: University of Waterloo
Lines: 19
Message-ID: <j3e342$dbb$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1314557890 13675 (28 Aug 2011 18:58:10 GMT)
NNTP-Posting-Date: Sun, 28 Aug 2011 18:58:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1646679
Xref: comp.soft-sys.matlab:741504


I want to integrate a function of w and t, wrt w, so the final answer should be a function of t. 

Rather than integrating wrt w, for each t in a loop, I tried three 'vectorized' ways:

isequal(a,b) % 1
isequal(a,c) % 1

The first two take up 4GB of RAM while computing, and take more than 50 seconds.
The third method takes negligible RAM and only 0.003245 seconds.

I only recently learned about James Tursa's (amazing) NTIMESX (thanks to Bruno and Matt) , and I happened to learn about it due to a completely unrelated reason to this problem .... this result explained above seems almost too good to be true ! 

Assuming that what I am doing with MTIMESX here is actually giving the answer I want (and this seems true since ISEQUAL gave me 1) , is there a better MATLAB way to do this ? The reason why I'm asking is because I'm actually writing this code for a different group and I'm not sure if they have MTIMESX or even a C compiler.