This is a long shot, but I'm wondering if there is anything I can do to optimise/improve the performance of the "lsfitlinear" method? I'm developing a .Net application that runs many different calculations on thousands of data points. One of these calculations involves a call to "lsfitlinear", and a .Net profiler tool shows these calls as accounting for half of the overall time spent in my calculation routine.
Typical usage scenario: my routine calls lsfitlinear around 5000 times, most times passing it just two values. The following is a typical example:-
var fmatrix = new double[,] { { 1, 0 }, { 1, 5 } }; var y = new double[] { 2623.203, 7202.05 };
|