示例#1
0
        private void Form6_Load(object sender, EventArgs e)
        {
            const int N = 64;

            double[] foo = new double[N];
            //Формирование массива действительных чисел.
            for (int i = 0; i < N; i++)
            {
                foo[i] = Math.Sin((2 * Math.PI * i) / N);
            }

            Complex[] X = DFT.Calculate(foo);
            DrawRe(X);
            DrawIm(X);
            DrawMg(X);
            DrawPh(X);
        }
示例#2
0
        private void Form5_Load(object sender, EventArgs e)
        {
            const int N = 64;

            double[] foo = new double[N];
            //Формирование массива действительных чисел.
            for (int i = 0; i < N; i++)
            {
                if (i < 32)
                {
                    foo[i] = 1;
                }
                else
                {
                    foo[i] = -1;
                }
            }

            Complex[] X = DFT.Calculate(foo);
            DrawRe(X);
            DrawIm(X);
            DrawMg(X);
            DrawPh(X);
        }