MATLAB: Divide a matrix per a vector

divideMATLABmatrix arraymatrix manipulation

Hi, I have a matrix A(7×1001) and a matrix B(1×7).
I'd like to divide the first row of A for the first colum(element) of B,
second row of A for the second column in B, and so on.
A and B are in attached

Best Answer

Try
C = A ./ reshape( U2, [],1 );