I have got a three-dimensional matrix
sigma = zeros(3, 3, 1000)
and a single matrix
result = [0.5 0.5 0.5; 0.2 0.2 0.2; 0.1 0.1 0.1]
My question would be: What is the most effective way to add my matrix 'result' to every single matrix along the third dimension of 'sigma'?
Currently I am looping over all 1000 matrices and add them one by one. Is there a Matlab-optimized way?
Thanks!