view general/numerical/matrix/minner.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
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)]));