Next step is determining the roots of the characteristic polynomial of a matrix. Before working on extracting the roots using Newton’s method I wanted to be able to visualize the function.
First we need to, given a square matrix as an input, return the characteristic polynomial, which basically is a function taking x as an argument and returning the determinant of the input matrix where x is subtracted for every element on the diagonal:
function pol(m) { var size = Math.sqrt(m.length); if (...
Published on June 27, 2017 15:53