예제 #1
0
        public static double FatorK(double grausLiberdade)
        {
            double taxa;

            double[] lista = new double[28] {
                13.97, 4.53, 3.31, 2.87, 2.65, 2.52, 2.43, 2.37, 2.32, 2.28, 2.25, 2.23, 2.21, 2.20, 2.18, 2.17, 2.16, 2.15, 2.14, 2.13, 2.11, 2.09, 2.07, 2.06, 2.06, 2.05, 2.025, 2
            };
            double[] vetorGraus = new double[28] {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 30, 35, 40, 45, 50, 100, 0
            };

            int limiteInferior = Convert.ToInt32(Math.Floor(grausLiberdade));
            int limiteSuperior = Convert.ToInt32(Math.Ceiling(grausLiberdade));

            for (int i = 0; i < vetorGraus.Length; i++)
            {
                if (grausLiberdade < vetorGraus[i])
                {
                    limiteInferior = Convert.ToInt32(vetorGraus[i - 1]);
                    limiteSuperior = Convert.ToInt32(vetorGraus[i]);
                    break;
                }
            }

            if (limiteSuperior > 100)
            {
                limiteInferior = 26;
                limiteSuperior = Convert.ToInt32(grausLiberdade);
                taxa           = Calculos.Interpolacao(limiteSuperior, limiteInferior, 2, lista[limiteInferior - 1]);
            }
            else
            {
                taxa = Calculos.Interpolacao(limiteSuperior, limiteInferior, lista[limiteSuperior - 1], lista[limiteInferior - 1]);
            }

            double K = (taxa * (grausLiberdade - limiteInferior)) + lista[limiteInferior - 1];

            return(K);
        }
예제 #2
0
        public static double IncertezaA(float[] vetor, int numeroMedidas)
        {
            double U = Calculos.DesvPad(vetor) / Math.Sqrt(Convert.ToDouble(numeroMedidas));

            return(U);
        }