Go to the first, previous, next, last section, table of contents.

Initializing matrix elements

Function: void gsl_matrix_set_all (gsl_matrix * m, double x)
This function sets all the elements of the matrix m to the value x.

Function: void gsl_matrix_set_zero (gsl_matrix * m)
This function sets all the elements of the matrix m to zero.

Function: void gsl_matrix_set_identity (gsl_matrix * m)
This function sets the elements of the matrix m to the corresponding elements of the identity matrix, @math{m(i,j) = \delta(i,j)}, i.e. a unit diagonal with all off-diagonal elements zero. This applies to both square and rectangular matrices.


Go to the first, previous, next, last section, table of contents.