Date: Jan 7, 2013 10:27 AM
Author: Matt J
Subject: Re: three 3D matrix multiplication

"Jeyakumar " <jeymagnetron@gmail.com> wrote in message <kceotp$cum$1@newscl01ah.mathworks.com>...
>
> thank u ...so much.. ths is simpler even... saves a fraction of time on large dimensions...:-)


When working with large dimensions, you probably shouldn't be computing tensor products directly. You should be exploiting the properties of tensor products. For example, with,

D=bsxfun(@times, A*B, C)

Instead of doing something like

sum(D,3)

it is more efficient to avoid computing D altogether and do

sum(C,3)*A*B