SYNOPSIS
#include "matrix.h" MAT *set_col(MAT *A, int k, VEC *out) MAT *set_row(MAT *A, int k, VEC *out)
#include "zmatrix.h" ZMAT *zset_col(ZMAT *A, int k, ZVEC *out) ZMAT *zset_row(ZMAT *A, int k, ZVEC *out)
DESCRIPTION
The routines set_col() and zset_col() above sets the value of the $k$th column of A to be the values of out. The A matrix so modified is returned. The routine set_row() above sets the value of the $k$th row of A to be the values of out. The A matrix so modified is returned. If out is NULL, then an E_NULL error is raised. If k is negative or greater than or equal to the number of columns or rows respectively, an E_BOUNDS error is raised. As the MAT and ZMAT data structures are row-oriented data structures, the set_row() routine is faster than the set_col() routine.
EXAMPLE
MAT *A; VEC *tmp; ...... /* scale row 3 of A by 2.0 */ tmp = get_row(A,3,VNULL); sv_mlt(2.0,tmp,tmp); set_row(A,3,tmp);
SEE ALSO: get_col() and get_row()
SOURCE FILE: matop.c, zmatop.c