public void polynomialFit(int n){
        if(this.nAnalyteConcns<(n+2))throw new IllegalArgumentException("Method polynomialFit(" + n +") requres at least " + (n+2) + " data points; only " + this.nAnalyteConcns + " were supplied");
        this.methodUsed = 2;
        this.sampleErrorFlag = true;
        this.degSet = true;
        this.polyDegree = n;
        this.titleOne = "Polynomial fitting: r = c[0] + c[1].a +  c[1].a^2 + ... + c[n].a^n; degree (n) = " +  n;
        if(!this.setDataOneDone)this.setDataOne();
        super.polynomial(n);
        for(int i=0; i<this.nInterp; i++){
            this.calculatedResponses[i] = 0.0;
            for(int j=0; j<=n; j++){
                this.calculatedResponses[i] +=  super.best[j]*Math.pow(this.interpolationConcns[i], j);
            }
        }
        if(!this.supressPlot)this.plott();
        this.curveCheck(this.methodIndices[this.methodUsed]);
    }