grapes-pow-grapes: Power of a Matrix

Description Usage Arguments Value Author(s) Examples

Description

This function overrides the power operator '^' in order to provide an easy method to perform the power of a square matrix.

Usage

1
A %^% n

Arguments

A

is the matrix to elevate

n

is the degree of the power

Value

the n-th power of the A matrix

Author(s)

Michele Stefano Altieri, michelestefano.altieri@gmail.com

Examples

1
2
3
4
5
A <- matrix(data = 1:4,
            nrow = 2,
            ncol = 2)
X <- A %^% 2
X

msaltieri/enertools documentation built on May 23, 2019, 7:50 a.m.