Next: Exchanging rows and columns, Previous: Copying matrices, Up: Matrices [Index]
The functions described in this section copy a row or column of a matrix
into a vector. This allows the elements of the vector and the matrix to
be modified independently. Note that if the matrix and the vector point
to overlapping regions of memory then the result will be undefined. The
same effect can be achieved with more generality using
gsl_vector_memcpy
with vector views of rows and columns.
This function copies the elements of the i-th row of the matrix m into the vector v. The length of the vector must be the same as the length of the row.
This function copies the elements of the j-th column of the matrix m into the vector v. The length of the vector must be the same as the length of the column.
This function copies the elements of the vector v into the i-th row of the matrix m. The length of the vector must be the same as the length of the row.
This function copies the elements of the vector v into the j-th column of the matrix m. The length of the vector must be the same as the length of the column.