From: Kai on
Hi,

i like to speed up my Matlab code.

first:
I like to multiplicate one (3x3xN) matrices with a single vektor (3x1) without using a for loop.

second:
I like to multiplicate two (3x3xN) matrices eg. rotation-matrices without using a for loop.


Does anybody have some ideas.


best Kai
From: James Tursa on
"Kai " <sihing_kai(a)gmx.de> wrote in message <hr435r$7nc$1(a)fred.mathworks.com>...
>
> I like to multiplicate one (3x3xN) matrices with a single vektor (3x1) without using a for loop.
>
> I like to multiplicate two (3x3xN) matrices eg. rotation-matrices without using a for loop.

Check out my mtimesx submission on the FEX:

http://www.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support

James Tursa
From: Kai on
"Kai " <sihing_kai(a)gmx.de> wrote in message <hr435r$7nc$1(a)fred.mathworks.com>...
> Hi,
>
> i like to speed up my Matlab code.
>
> first:
> I like to multiplicate one (3x3xN) matrices with a single vektor (3x1) without using a for loop.
>
> second:
> I like to multiplicate two (3x3xN) matrices eg. rotation-matrices without using a for loop.
>
>
> Does anybody have some ideas.
>
>
> best Kai

Thanx James, but i have big problems to run your tools on Matlab 7.7 on MAC
From: Kai on
"Kai " <sihing_kai(a)gmx.de> wrote in message <hr4ltq$1g2$1(a)fred.mathworks.com>...
> "Kai " <sihing_kai(a)gmx.de> wrote in message <hr435r$7nc$1(a)fred.mathworks.com>...
> > Hi,
> >
> > i like to speed up my Matlab code.
> >
> > first:
> > I like to multiplicate one (3x3xN) matrices with a single vektor (3x1) without using a for loop.
> >
> > second:
> > I like to multiplicate two (3x3xN) matrices eg. rotation-matrices without using a for loop.
> >
> >
> > Does anybody have some ideas.
> >
> >
> > best Kai
>
> Thanx James, but i have big problems to run your tools on Matlab 7.7 on MAC

I attempted this withou any results
blas_lib=('/Applications/MATLAB_R2008bSV.app/extern/include/blash');
mex('-DDEFINEUNIX','-largeArrayDims','mtimesx.c',blas_lib);
From: James Tursa on
"Kai " <sihing_kai(a)gmx.de> wrote in message <hr4ltq$1g2$1(a)fred.mathworks.com>...
> "Kai " <sihing_kai(a)gmx.de> wrote in message <hr435r$7nc$1(a)fred.mathworks.com>...
> > Hi,
> >
> > i like to speed up my Matlab code.
> >
> > first:
> > I like to multiplicate one (3x3xN) matrices with a single vektor (3x1) without using a for loop.
> >
> > second:
> > I like to multiplicate two (3x3xN) matrices eg. rotation-matrices without using a for loop.
> >
> >
> > Does anybody have some ideas.
> >
> >
> > best Kai
>
> Thanx James, but i have big problems to run your tools on Matlab 7.7 on MAC

Sorry to hear that. I only have access to 32-bit Windows versions myself so I cannot test on any other platforms. However, other users have reported getting mtimesx to successfully work on 64-bit platforms, linux platforms, and mac platforms. I would be very interested in what particular problems you are having on your mac platform, as it is my goal to have mtimesx run on as many different platforms as possible. Please feel free to e-mail me directly at the address listed in the pdf file if you prefer. Thanks.

James Tursa