grapes-pow-grapes: Compute Powers of Matrices

Description Usage Arguments Value Examples

Description

Multiplies a square matrix by itself

Usage

1
m %^% pow

Arguments

m

An n x n matrix.

pow

A nonzero integer, the exponent to compute.

Value

m raised to the number passed as pow. If pow=1, the unmodified matrix.

Examples

1
2
m <- matrix(1:9, nrow =3)
m %^% 4

ryan-heslin/matador documentation built on Dec. 22, 2021, 8:17 p.m.