I want to multiply each element of a vector with a matrix such that I end up with a 3D matrix (or higher dimentions).
For example if A is a vector and B is a matrix I would write:
for indx=1:length(A) result(:,:,indx)=A(indx).*Bend
Is for-loops the way to go here or are there any better solutions?
Best Answer