예제 #1
0
        private DoubleVector FitData(double[] xDataRaw, double[] yDataRaw)
        {
            DoubleParameterizedFunction func = new Function();

            var f = new DoubleParameterizedDelegate(
                func.Evaluate);

            var fitter =
                new OneVariableFunctionFitter <TrustRegionMinimizer>(f);
            DoubleVector x        = new DoubleVector(xDataRaw);
            DoubleVector y        = new DoubleVector(yDataRaw);
            DoubleVector init     = new DoubleVector((yDataRaw.Min()).ToString() + " " + 0.5 + " " + ((yDataRaw.Max() - yDataRaw.Min())).ToString());
            DoubleVector solution = fitter.Fit(x, y, init);



            double[] yData = new double[xDataRaw.Length * 600];
            double[] xData = new double[xDataRaw.Length * 600];

            for (int g = 0; g < yData.Length; g++)
            {
                double rads = ((xDataCourse[0] + g)) * 2 * Math.PI / 180;
                yData[g] = MyFunction(solution, (rads));
                xData[g] = xDataCourse[0] + g;

                Console.Writeline("x: " + xData[g] + "   y: " + yData[g]);
            }

            return(solution);
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Team Leader: Nikita Shatokhin");
            Console.WriteLine("Team Leader Web-Developer: Klimenko Alena");

            Console.WriteLine("Developer: Mikhail Shumakov");
            Console.WriteLine("Developer: Anastasia Skrynnikova");
            Console.WriteLine("Developer: Vladimir Batiyk");
            Console.WriteLine("Developer: Nadya Mojelskaya");
            Console.WriteLine("Developer: Viktoriya Tyo");
            Console.WriteLine("Developer: Zhidkova Olesya");
            Console.WriteLine("Developer: Ivanov Roman");
            Console.WriteLine("Developer: Muraviev Nikita");
            Console.Writeline("Bomjara: Kilin David");

            Console.WriteLine("Doc: Nikita Yurkin");
            Console.WriteLine("Doc: Vasiliy Tsagadinov");


            Console.ReadKey();
        }