mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
59 lines (43 loc) • 985 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Calculate the Matrix QR decomposition. Matrix `A` is decomposed in
two matrices (`Q`, `R`) where `Q` is an
orthogonal matrix and `R` is an upper triangular matrix.
## Syntax
```js
math.qr(A);
```
Parameter | Type | Description
--------- | ---- | -----------
`A` | Matrix &
Type | Description
---- | -----------
{Q: Array &
```js
var m = [
[],
[],
[],
[]
];
var result = math.qr(m);
// r = {
// Q: [
// [0.5, -0.5, 0.5],
// [0.5, 0.5, -0.5],
// [0.5, 0.5, 0.5],
// [0.5, -0.5, -0.5],
// ],
// R: [
// [2, 3, 2],
// [0, 5, -2],
// [0, 0, 4],
// [0, 0, 0]
// ]
// }
```
[](lu.md)