C++
C#
VB
JScript
All

# col

Copyright (C) 2005 IENT-RWTH Aachen

template<class G> inline typename MatrixCol< Matrix<G> >::self col( Matrix<G> &X, typename Matrix<G>::int_type n)
template<class G> inline typename MatrixCol<const Matrix<G> >::self col(const Matrix<G> &X, typename Matrix<G>::int_type n)

Isolates a column

Parameters

X | The matrix
n | Position of the column

Returns

A vector representing the n-th column of X

Example

    DenseMatrix<int>::self X(2,2,"1 2 3 4");
    cout << col(X,0) << endl; // [1 3]

See Also

cols, row, rows