matrix-power: Raise a matrix to a power

%^%R Documentation

Raise a matrix to a power

Description

Raises a matrix x to the y-th power. x ^ y computes element wise powers, whereas this computes y - 1 matrix multiplications. mat_power(x, y) is identical to x %^% y.

Usage

x %^% y

mat_power(x, y)

Arguments

x

A numeric or integer matrix.

y

An integer.

Value

A matrix.


levisc8/ipmr documentation built on Feb. 22, 2023, 9:15 p.m.