Suppose I have a matrix like:
100 200 300 400 500 600 1 2 3 4 5 6 10 20 30 40 50 60 ...
I wish to divide each row by the
Use bsxfun:
bsxfun
outMat = bsxfun (@rdivide, inMat, inMat(2,:));
The 1st argument to bsxfun is a handle to the function you want to apply, in this case right-division.