Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | mathematics | |
Tool | lsfit |
yy | vector of new driving values (Input) | ||
Allowed: | double | ||
Default: | F |
include "lsfit.g" nuk := 5; # nr of unknowns print 'xxin=',xxin := [1:nuk]; # simulated input values lsf.init(nuk); # initialise matrix and vector print lsf.status(); # optional for (i in [1:(nuk-1)]) { for (j in [(i+1):nuk]) { aa := rep(0,nuk); # coefficient vector aa[i] := 1; aa[j] := 1; yy1[i] := xxin[i]*aa[i] + xxin[j]*aa[j]; # driving value lsf.accumulate(aa,yy1[i]); # accumulate equation } } xx1 := lsf.solve( ); # solve for input vector yy1 xx2 := lsf.solve(yy2); # solve for other vector yy2 xx3 := lsf.solve(yy3); # solve for other vector yy3 xx4 := lsf.solve(yy4); # solve for other vector yy4