in reply to Stumped with a math question in my Perl program
I think you ought to search CPAN for code to do a least-square curve fit. Perhaps Algorithm::CurveFit or Statistics::LineFit. Since you want a simple scale factor, then you're looking at fitting a line. So you'd minimize the value of sum(F(k))=(E1k-A*E2k)^2, where E1 is your first column, E2 is your second column, and A is your scaling factor.
Disclaimer: My numerical analysis course was over 25 years ago, so my memory may be a little off. You'll want to double-check me, in case I've inadvertently missed (or added) something...
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Stumped with a math question in my Perl program (log scale)
by tye (Sage) on Jul 21, 2010 at 05:53 UTC | |
by roboticus (Chancellor) on Jul 21, 2010 at 14:53 UTC |