Path: news.mathworks.com!not-for-mail
From: "ghasem " <shaban_sadeghi@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: MTIMESX when Inner matrix dimensions are not agree.
Date: Thu, 18 Apr 2013 12:28:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <kkoosp$a0m$1@newscl01ah.mathworks.com>
References: <kkn6k2$64$1@newscl01ah.mathworks.com> <kko2ie$bm2$1@newscl01ah.mathworks.com> <kko531$hv7$1@newscl01ah.mathworks.com> <kko8ji$qlk$1@newscl01ah.mathworks.com> <kkohgh$jqm$1@newscl01ah.mathworks.com>
Reply-To: "ghasem " <shaban_sadeghi@yahoo.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1366288089 10262 172.30.248.35 (18 Apr 2013 12:28:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 18 Apr 2013 12:28:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4223132
Xref: news.mathworks.com comp.soft-sys.matlab:793816

> No you didn't, since you ask about "matrix dimension must agree" error.
> 
> And you start over again with mmx.
> 
> Bruno
=================================
yes,I know,but you don't understand my question.
in fact,my question was as follow:
if I want to use from MTIMESX for fast opertaion,but second dimension of A is not equal with first diemnsion of B,but second and third dimensions in both A and B are same,is a good choice MTIMESX?
for example:
a=rand(33,32,32);
b=rand(33,32,32);
I konw that : c = mtimesx(a,b) => is false!
also,I know that simply : c =a.*b
but I want to use from:
c = permute(mtimesx(permute(a,[2 3 1]),permute(b,[2 3 1])),[3 1  2]);
NOW,my question was:
between " .* " operator and " mtimesx (or mmx)" , which is faster?
ghasem