UNPKG

nerdamer-ts

Version:

javascript light-weight symbolic math expression evaluator

20 lines 665 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.matgetcol = void 0; const Symbol_1 = require("../../../../Types/Symbol"); const Matrix_1 = require("../../../../Types/Matrix"); function matgetcol(matrix, col_index) { //handle symbolics if (!col_index.isConstant()) return (0, Symbol_1.symfunction)('matgetcol', arguments); col_index = Number(col_index); var M = Matrix_1.Matrix.fromArray([]); matrix.each(function (x, i, j) { if (j === col_index) { M.elements.push([x.clone()]); } }); return M; } exports.matgetcol = matgetcol; //# sourceMappingURL=matgetcol.js.map