view general/numerical/matrix/minner.m @ 37:beb8a3f4a345

Renamed prefs to options throughout.
author samer
date Mon, 28 Jan 2013 10:52:11 +0000
parents db7f4afd27c5
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)]));