Beispiel #1
0
        private void SetDataSourceForChart(GarmonicSignal.Function func)
        {
            for (int n = 0; n < func.N; n++)
            {
                double x = func.GetValue(n);

                chart.Series["GarmonicFunction"].Points.AddXY(n, x);
            }
        }
Beispiel #2
0
        private void btnBuild_Click(object sender, EventArgs e)
        {
            ClearChart();

            int a    = Convert.ToInt32(numUpDownA.Value);
            int freq = Convert.ToInt32(numUpDownFreq.Value);

            double phase = GetPhaseValue();
            int    N     = GetNValue();

            var function = new GarmonicSignal.Function(a, freq, phase, N);

            SetDataSourceForChart(function);
        }