MATLAB: Divide rows of A by first entry of row

indexingMATLAB

I am trying to divide each row of my matrix by its first row entry (to normalize the row).
I can do this for a single row (e.g. row 15 of 2D matrix 'sums'):
sums(15,1:end) ./ sums(15,1)
But this doesn't work:
sums(:,1:end) ./ sums(:,1);
Is there a way to do this in matrix notation, i.e., w/out looping?

Best Answer

A_norm = bsxfun(@rdivide,A,A(:,1))