Example #1
0
 protected override void FillList()
 {
     for (float i = 0.1f; i < Math.Abs(inpFunction.Right - inpFunction.Left); i += 1f)
     {
         FunctionFromTask fft = new FunctionFromTask();
         fft.Left       = inpFunction.Left;
         fft.Right      = inpFunction.Right;
         fft.QuantumAbs = i;
         fft.QuantumOrd = inpFunction.QuantumOrd;
         fft.OnlyResult = true;
         fft.Build();
         KotelnikovFunction kf = new KotelnikovFunction(fft);
         kf.OnlyResult = true;
         kf.Build();
         KotelnikovFunction kf2 = new KotelnikovFunction(kf);
         kf2.OnlyResult = true;
         kf2.QuantumAbs = 0.4f;
         kf2.Build();
         SquareAproximationMistakeFunction aprox = new SquareAproximationMistakeFunction(kf2)
         {
             OnlyResult = true
         };
         aprox.Build();
         var sum = aprox.Sum(a => Math.Abs(a.Y));
         OnNewPoint(this, new FuncEventArgs(new System.Drawing.PointF(i, sum)));
     }
 }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FunctionFromTask inpFunc = new FunctionFromTask();

            inpFunc.Left       = 0;
            inpFunc.Right      = (float)Math.PI * 6 + 0.1f;
            inpFunc.QuantumOrd = 0.2f;//TryConvert(ConrainsQVOrd);
            inpFunc.QuantumAbs = 0.2f;
            FuncAnalog.AddFunc(inpFunc);
            FuncAnalog.DrawFunc();
        }