Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ diagonal() [3/3]

template<typename T , require_matrix_t< T > * = nullptr>
auto stan::math::diagonal ( const T &  m)
inline

Return a column vector of the diagonal elements of the specified matrix.

The matrix is not required to be square.

Template Parameters
Ttype of the matrix
Parameters
mSpecified matrix.
Returns
Diagonal of the matrix.

Definition at line 19 of file diagonal.hpp.