Beispiel #1
0
 public void SetFittedRangeFromIndexes(List <int> Indexes)
 {
     SetNoFit();
     foreach (int i in Indexes)
     {
         if (SimpleFunctions.IsARealNumber(this[i].LogODValue))
         {
             this[i].UsedInFit = true;
         }
     }
     FitData();
     pGrowthRate.Notes = "Range Picked Data";
 }
Beispiel #2
0
 public LinearFit(double[] XGOOD, double[] YGOOD)
 {
     name = "Linear";
     if ((XGOOD.Length < 2 || YGOOD.Length < 2) || (XGOOD.Length != YGOOD.Length))
     {
         throw new Exception("Linear fit can't work with less then 2 points or unequal matrices");
     }
     if (XGOOD.Count(n => !SimpleFunctions.IsARealNumber(n)) > 0 || YGOOD.Count(n => !SimpleFunctions.IsARealNumber(n)) > 0)
     {
         throw new Exception("Linear fit can't work on data that contains non real numbers");
     }
     x           = XGOOD;
     y           = YGOOD;
     pParameters = new double[2];//linear model
     FitModel();
 }