Library: | multi |
See also: | ^ |
Quantlet: | power | |
Description: | calculates x to the power of exponent |
Usage: | y =power(matrixx,exponent) | |
Input: | ||
matrixx | n x n matrix | |
exponent | integer, exponent of the matrix | |
Output: | ||
y | matrix, x^exponent |
library("multi") randomize(1000) x = normal(3,3) y = power(x,2) y
Contents of y [1,] 3.6194 1.9439 -0.96658 [2,] -4.5294 1.85 1.3923 [3,] -3.1163 -0.13572 9.987