A=rand(10,20,30);B=[1:30];
I want to divide A with B along the third dimension. I got the required result using loop.
for ii=1:30 C(:,:,ii)=A(:,:,ii)/B(ii); end
But is there any pre-defined function which does the same operation, which takes the dimension as a input along which we want to divide a matrix.
Best Answer