How to use the eigs function from mathjs
Find comprehensive JavaScript mathjs.eigs code examples handpicked from public code repositorys.
57 58 59 60 61 62 63 64 65 66
const validateDataResult = validateData({ ...dataForm }); if(validateDataResult){ const matrixTransformered = transformMatrix(dataForm.A); const vectorTransformered = transformMatrix(dataForm.b); const eigs = mathjs.eigs(matrixTransformered); var flag= true; for(var i=0;i<eigs.values.length;i++){ console.log(eigs.values[i]) if(eigs.values[i]<0){
1
0
0
368 369 370 371 372 373 374 375 376
} var covariance_matrix = covarianceMatrix(matrix) // Eigenvectors var e = math.eigs(covariance_matrix) var eigen_values = e.values var eigen_vectors = e.vectors
0
0
0
+ 3 other calls in file
mathjs.evaluate is the most popular function in mathjs (87200 examples)