Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: lsfit.status - Function Up: lsfit - Tool Previous: lsfit.solve - Function


lsfit.inityonly - Function



Package utility
Module mathematics
Tool lsfit


initialise the vector only


Synopsis
inityonly()


Description
For large numbers of equations, it may be too expensive to keep the coefficients of the input equations. In this case it is still possible to solve for a new yy-vector without a new inversion.






Example

lsf.init(nuk);	                  # initialise matrix and vector
for (i in [1:(nuk-1)]) {
    for (j in [(i+1):nuk]) {
        aa := rep(0,nuk);         # coefficient vector
        aa[i] := 1;
        aa[j] := 1;	
        lsf.accumulate(aa,yy1[i],wgt[i]);     # accumulate equation
    }
}
xx1 := lsf.solve();		# solve for input vector yy1

lsf.inityonly();	                  # initialise matrix and vector
for (i in [1:(nuk-1)]) {
    for (j in [(i+1):nuk]) {
        aa := rep(0,nuk);         # coefficient vector
        aa[i] := 1;
        aa[j] := 1;	
        lsf.accumulate(aa,yy2[i]);     # accumulate equation
    }
}
xx2 := lsf.solve();		# solve for vector yy2


next up previous contents index
Next: lsfit.status - Function Up: lsfit - Tool Previous: lsfit.solve - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15