private void button4_Click(object sender, EventArgs e)
        {
            string s = textBox3.Text;
            data   d = new data();

            d.write_data_inFile(s, y_axis_signal_merge);
        }
예제 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            data   d = new data();
            string s = textBox4.Text;

            d.read_data_file_pA(s);
            d.caculate_rael_image(d.ambitude, d.phase);
            inverse_DFT(d.real, d.image);
            string s1 = textBox5.Text;

            d.write_data_inFile(s1, result);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            List<double> FinalResult = new List<double>();
            List<double> ecg = new List<double>();
            List<double> hN_after_convultion = new List<double>();
            double fc1 = 0;
            double fc2 = 0;
            double transition_width = 0;
            double Attinuation = 0;
            double Sampling = 0;
            fc1 = double.Parse(textBox4.Text);
            fc2 = double.Parse(textBox5.Text);
            transition_width = double.Parse(textBox1.Text);
            Attinuation = double.Parse(textBox2.Text);
            Sampling = double.Parse(textBox3.Text);
            if (textBox5.Text == "")
            { fc2 = 0; }
            FinalResult = Calculation_of_Hn(Attinuation,transition_width,Sampling,fc1,fc2);//store in file
            string coffetionet = "coffetionet.txt";
            d.write_data_inFile(coffetionet,FinalResult);

            string s = textBox8.Text;
            ecg = d.read_data_file(s);

            //hN_after_convultion = f.convelution_Directe(FinalResult, ecg);//sto in file
            string Coeffaftercon = "coffetionet_After_convolution.txt";
            d.write_data_inFile(Coeffaftercon, hN_after_convultion);
             int Nforup;
            int Nfordown;
            Nforup=int.Parse(textBox7.Text);
            Nfordown=int.Parse(textBox6.Text);
            //SAMPLING
            List<double> SamplingResult = UPSamplingAndDownSampling(FinalResult, ecg, Nforup, Nfordown);//store in file
            string SamplingRes = "SamplingResult.txt";
            d.write_data_inFile(SamplingRes, SamplingResult);
        }