private void pervunuu_Analyze(List <double> ourNum1, List <double> ourn, List <double> ourp) //x - l, n - l, p - l { Controls.Clear(); InitializeComponent(); ourData = new DataGridView(); ourData3 = new DataGridView(); chart1 = new Chart(); MyMath ourOperation = new MyMath(); // Control cnt = new Button(); cnt.Location = new Point(400, 25); cnt.Text = "Гістограмна оцінка"; cnt.Size = new Size(100, 20); cnt.Click += ourCheckBox_Click1; cnt.Enabled = false; Controls.Add(cnt); cnt = new Button(); cnt.Text = "Емпірична функція розподілу"; cnt.Click += ourCheckBox_Click2; cnt.Size = new Size(100, 20); cnt.Location = new Point(400, 45); Controls.Add(cnt); // ПЕРЕТВОРЕННЯ ДАННИХ cnt = new Button(); cnt.Location = new Point(510, 25); cnt.Text = "Без перетворення"; cnt.Size = new Size(100, 20); cnt.Click += ourButtonTOChange_1; Controls.Add(cnt); cnt = new Button(); cnt.Text = "Стандартизувати"; cnt.Size = new Size(100, 20); cnt.Click += ourButtonTOChange_3; cnt.Location = new Point(510, 45); Controls.Add(cnt); cnt = new Button(); cnt.Text = "Зсув"; cnt.Click += ourButtonTOChange_4; cnt.Size = new Size(100, 20); cnt.Location = new Point(620, 25); Controls.Add(cnt); cnt = new Button(); cnt.Click += ourButtonTOChange_2; cnt.Text = "Логарифмування"; cnt.Size = new Size(100, 20); cnt.Location = new Point(620, 45); Controls.Add(cnt); cnt = new TextBox(); if (ourM_Chang <= 0) { cnt.Text = "M"; } else { cnt.Text = $"{ourM_Chang}"; } cnt.TextChanged += ourM_Change; cnt.Size = new Size(100, 20); cnt.Location = new Point(730, 45); Controls.Add(cnt); { Control cnt2 = new Button(); cnt2.Click += ourButtonTOKillAnom; cnt2.Text = "Вилучення аномальних"; cnt2.Size = new Size(100, 20); cnt2.Location = new Point(730, 25); Controls.Add(cnt2); } //Варіаційний ряд ourData.Location = new Point(10, 70); ourData.Size = new Size(350, 200); Controls.Add(ourData); ourData.Columns.Add("x", "x"); ourData.Columns.Add("n", "n"); ourData.Columns.Add("p", "p"); for (int i = 0; i < ourNum1.Count; i++) { ourData.Rows.Add($"{ourNum1[i]}", $"{ourn[i]}", $"{ourp[i]}"); } // double count = 0; foreach (var el in ourn) { count += el; } if (ourM_Chang <= 0) { ourM = ourOperation.ourM_Find(ourn, count); Controls[8].Text = $"{ourM}"; } else { ourM = ourM_Chang; } double ourH = ourOperation.ourH_Find(ourNum1, ourM); ourHTemp = ourH; List <double> ourXi = new List <double>(); List <double> ourPi = new List <double>(); ourPi = ourOperation.ourPi_Find(ourNum1, ourp, ourH, ourM, ourNum1[0]); ourXi = ourOperation.ourXi_Find(ourNum1[0], ourH, ourM); ourH = ourOperation.ourRound(ourH, 2); ourNum1 = ourOperation.ourRound(ourNum1, 2); ourPi = ourOperation.ourRound(ourPi, 5); ourXi = ourOperation.ourRound(ourXi, 2); if (choiseOnGraph == 0) { createOurChart_GridView1(ourNum1, ourPi, ourXi, count, ourH); } else if (choiseOnGraph == 1) { createOurChart_GridView2(ourNum1, ourPi, ourXi, count, ourH); } // // letsMathsThis(ourPi, ourXi, count, ourH); // }