view general/numerical/matrix/minner.m @ 16:db7f4afd27c5

Rearranging numerical toolbox.
author samer
date Thu, 17 Jan 2013 13:20:44 +0000
parents general/numerical/ttimes.m@e44f49929e56
children
line wrap: on
line source
function C=minner(A,B)
% minner - inner product for arbitrary dimension arrays
%
% ttimes :: [[I,J]], [[J,K]] -> [[I,K]].
%
% ie just like mtimes, but I and K can be row vectors

Adom=size1(A);
Bdom=size1(B);
A=reshape(A,[],Bdom(1));
B=reshape(B,Bdom(1),[]),
C=reshape(A*B,tosize([Adom(1:end-1) Bdom(2:end)]));