diag_ind: Make vector of 1-dimensional diagonal indices for square...

Description Usage Arguments Value See Also Examples

Description

Compute vector of indices for efficient access to diagonal of a square matrix

Usage

1

Arguments

n

integer dimension of (square) matrix

Value

integer vector of length n with indices (unidimensional) of square matrix

See Also

diag_mat

Examples

1
2
ind <- diag_ind(5)
diag_mat(seq(5))[ind]


Search within the networkTomography package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.