Skip to content
Prev 305636 / 398506 Next

How to divide each column with its own value

On 17-09-2012, at 07:31, Jha, Ashutosh Kumar wrote:

            
That is not an identity matrix. It is a matrix with all elements equal to 1.
An identity matrix has 1 on the diagonal and 0 elsewhere and is created by diag(..)

The OP asked about divide and the answer I gave was geared to that specific question.
Of course if the result is a constant value for all elements a simple matrix(...) will also do.

Berend