You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got installed the kalman library through the NPM and try to start my code:
var kalman = require('kalman');
var math = require('mathjs');
let valx = [ 4, 5 ];
let valp = math.matrix([[ 5, 0 ], [ 0, 4 ]]);
var valr = [];
var vala = math.matrix([[ 5, 0 ], [ 0, 4 ]]);
valr['A'] = vala;
let kf = new kalman.KF(valx, valp);
kf.update(valr);
After start found the error:
Wondering what's wrong, thanks.
kalman.js:75
var xhat = A.multiply(x).add(B.multiply(u));
^
TypeError: A.multiply is not a function
at KF.update (...kalman.js:75:18)
at Object. (...index2.js:21:4)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
The text was updated successfully, but these errors were encountered:
As stated in the docs, Kalman.js is meant to work with lina libaries that feature a syntax similar to the one of Sylvester.js. The syntax of math.js differs too much, as it uses static function calls instead of member methods. But porting the library should be trivial.
I've got installed the kalman library through the NPM and try to start my code:
var kalman = require('kalman');
var math = require('mathjs');
let valx = [ 4, 5 ];
let valp = math.matrix([[ 5, 0 ], [ 0, 4 ]]);
var valr = [];
var vala = math.matrix([[ 5, 0 ], [ 0, 4 ]]);
valr['A'] = vala;
let kf = new kalman.KF(valx, valp);
kf.update(valr);
After start found the error:
Wondering what's wrong, thanks.
kalman.js:75
var xhat = A.multiply(x).add(B.multiply(u));
^
TypeError: A.multiply is not a function
at KF.update (...kalman.js:75:18)
at Object. (...index2.js:21:4)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
The text was updated successfully, but these errors were encountered: