Use 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.
More Related Contents:
- Matrix “Zigzag” Reordering
- How can I index a MATLAB array returned by a function without first assigning it to a local variable?
- Matrix of unknown length in MATLAB?
- For loop to split matrix to equal sized sub-matrices
- How do you concatenate the rows of a matrix into a vector?
- How can I accumulate cells of different lengths into a matrix in MATLAB?
- How do I visualize a matrix with colors and values displayed?
- Is MATLAB row specific or column major?
- How can I change the values of multiple points in a matrix?
- Construct adjacency matrix in MATLAB
- Replace specific columns in a matrix with a constant column vector
- How can I apply a function to every row/column of a matrix in MATLAB?
- Get the indices of the n largest elements in a matrix
- Multiply a 3D matrix with a 2D matrix
- How do I resize a matrix in MATLAB?
- Is there a substitute for blockproc in Matlab?
- How do I compare all elements of two arrays?
- How to subtract a vector from each row of a matrix? [duplicate]
- Building a matrix by merging the same row vector multiple times
- Matlab: repeat every column sequentially n times [duplicate]
- Index of max and min value in an array
- How can I count the number of elements of a given value in a matrix?
- How do I divide matrix elements by column sums in MATLAB?
- Does Matlab eig always returns sorted values?
- MATLAB find and apply function to values of repeated indices
- the easiest way to convert matrix to one row vector [duplicate]
- Extract arbitrarily rotated plane of data from 3D array as 2D array
- MATLAB: Subtracting matrix subsets by specific rows
- How do I convert a 2X2 matrix to 4X4 matrix in MATLAB?
- Efficiently compute a 3D matrix of outer products – MATLAB