private void GraphOfQuantization_Load(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            f.CreateGraph(zedGraphControl1, Quantization.q_x, Color.Blue);
            zedGraphControl1.ClientSize = this.Size;
        }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[]     path = f.showDialog();
            FileStream   fs   = new FileStream(path[0], FileMode.Open);
            StreamReader sr   = new StreamReader(fs);

            while (sr.Peek() != -1)
            {
                string   tmp  = sr.ReadLine();
                string[] line = tmp.Split(',');
                string[] a    = line[0].Split('[');
                string[] t    = line[1].Split(']');
                amplitude.Add(double.Parse(a[1]));
                theta.Add(double.Parse(t[0]));
            }
            for (int i = 0; i < amplitude.Count; i++)
            {
                List <double> tmpXk = new List <double>();
                tmpXk.Add(amplitude[i] * Math.Cos(theta[i]));
                tmpXk.Add(amplitude[i] * Math.Sin(theta[i]));
                Xk.Add(tmpXk);
            }
        }
Ejemplo n.º 3
0
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[] path = f.showDialog();
            f.readFile(path[0], XnFF);
        }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[] path = f.showDialog();
            f.readFile(path[0], x1);
            f.readFile(path[1], x2);
            for (int i = 0; i < x1.Count; i++)
            {
                result.Add(0);
            }
            for (int i = 0; i < x1.Count; i++)
            {
                KeyValuePair <double, double> tmp = new KeyValuePair <double, double>(i, x1[i]);
                pair.Add(tmp);
            }
        }
Ejemplo n.º 5
0
 private void btnBrowse_Click(object sender, EventArgs e)
 {
     if (cmboxOperations.SelectedIndex == 0 || cmboxOperations.SelectedIndex == 1 || cmboxOperations.SelectedIndex == 3 || cmboxOperations.SelectedIndex == 5)
     {
         MessageBox.Show("Please Choose 2 Files", "Alert", MessageBoxButtons.OK);
         FirstTask f    = new FirstTask();
         string[]  path = f.showDialog();
         f.readFile(path[0], signal1);
         f.readFile(path[1], signal2);
     }
     else
     {
         MessageBox.Show("Please Choose only 1 File", "Alert", MessageBoxButtons.OK);
         FirstTask f    = new FirstTask();
         string[]  path = f.showDialog();
         f.readFile(path[0], signal1);
     }
 }
        private void btnBrowse_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            string[]     path = f.showDialog();
            FileStream   fs   = new FileStream(path[0], FileMode.Open);
            StreamReader sr   = new StreamReader(fs);

            while (sr.Peek() != -1)
            {
                string        tmp  = sr.ReadLine();
                string[]      line = tmp.Split(',');
                List <double> t    = new List <double>();
                t.Add(double.Parse(line[0]));
                t.Add(double.Parse(line[1]));
                XkIFF.Add(t);
            }
            sr.Close();
            fs.Close();
        }
Ejemplo n.º 7
0
        private void btnTask1_Click(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            f.Show();
        }
Ejemplo n.º 8
0
        private void GraphSumOfSignals_Load(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            f.CreateGraph(zedGraphSum, FirstTask.sum, Color.Red);
        }
        private void GraphOfConvolution_Load(object sender, EventArgs e)
        {
            FirstTask f = new FirstTask();

            f.CreateGraph(zedGraphControl1, list, Color.Red);
        }