I have a 3d (or in general n-dimensional) matrix A
with dimensions
size(A) = [d1 d2 d3 ... dn].
Now I want to do a vector multiplication with a column vector v
over one of the dimensions (as I would do in 2 dimensions, where I get a vector returned - for instance for d1 = 2
, d3 = 4
and size(v) = d2
), so that
(A*d)_i = sum(a_ij*v_j).
Hence I want to reduce by one dimension.
Is there a Matlab function(other than looping) that returns for a d3
-dimensional column vector v
(A*v)_ij = sum(A_ijk*v_k).
I hope this was clear.
Thanks!