emulator (version 1.2-20)

tr: Trace of a matrix

Description

Returns the trace of a matrix

Usage

tr(a)

Arguments

a

Matrix whose trace is desired

Examples

Run this code
# NOT RUN {
tr(matrix(1:9,3,3))
# }

Run the code above in your browser using DataLab