Given a matrix and a vector
A = [ 1 2; 2 4 ];
v = [ 2 4 ];
how can I divide each column of the matrix by the respective element of the vector? The following matrix should be
[ 1/2 2/4; 2/2 4/4 ]
Basically I want to apply a column-wise operation, with operands for each column stored in a separate vector.