ADMB Documentation
-a65f1c97
|
Fills a matrix with a vectorThis function fills a matrix m with a vector v. More...
#include "statsLib.h"
Go to the source code of this file.
Functions | |
void | fill (const dmatrix &_d, const dvector &_v) |
void | fill (const dvar_matrix &_d, const dvar_vector &_v) |
Fills a matrix with a vector
This function fills a matrix m with a vector v.
The matrix must have the same number of elements as the vector. eg. fill(m,v);
Example;
vector x(1,50);
matrix m(1,5,1,10);
!! x.fill_seqadd(1,1);
!! fill(m,x);
!! cout<<m<<endl;
Produces the following output.
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
m | is a dmatrix |
v | is a dvector. |
Definition in file fill.cpp.
void fill | ( | const dvar_matrix & | _d, |
const dvar_vector & | _v | ||
) |
Generated on Wed Sep 7 2022 00:01:31 for ADMB Documentation by 1.8.5 |