This bothers me a bit:
Suppose you have a matrix with three layers.
Is there a simple way to multiply this matrix with a vector of three elements so that the
There's a matlab function called repmat that'll help you in this.
repmat
M = [1 2 3] M * repmat([1 2 3], 3,1) ans = 6 12 18 6 12 18 6 12 18 M = [1 2 3] M .* repmat([1 2 3], 3,1) ans = 1 4 9 1 4 9 1 4 9
Depending on how exactly you want to organise your matrices.