Methods
(static) pow(x) → {matrix}
Calculate a matrix to the exponent of x
Examples
// Invert a non-singular matrix
var M = require('./src/matrix_lib');
var A = new M([[1,2,3],[4,5,6],[7,8,5]]); // non singular matrix
console.log(A.invert().print());
// result:
//-1.917 1.167 -0.250
//1.833 -1.333 0.500
//-0.250 0.500 -0.250
// Execution environment example
var M = require('./src/matrix_lib');
M.execute(function(M){
var X = M.range(0,0.1,10); // Create input
var Y = -1.3*X**2 + 13*X + -5*X + 30;
console.log(Y.print());
console.log(Y.size());
})
Parameters:
| Name | Type | Description |
|---|---|---|
x |
int | Exponent power |
Returns:
- Type
- matrix