private void setup() { ourmode = mode.other; BaseValues bv = new BaseValues(); bv.ShowDialog(); time = BasicFunction.calcSize(freq); float step = BasicFunction.calcStep(freq); bf = new BasicFunction(Amp, freq, time, step); bf.BuildBasicFunction(); label2.Text = BasicFunction.Amp.ToString(); label4.Text = BasicFunction.f.ToString(); chart1.Series[0].Points.Clear(); chart1.Series[1].Points.Clear(); chart1.Series[0].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline; for (int i = 0; i < bf.size; i++) { chart1.Series[0].Points.AddXY(bf.xTable[i], bf.yTable[i]); } }
public void Sampling() { float j = 0; for (int i = 0; i < size; i++, j += step) { x[i] = j; y[i] = BasicFunction.Func(j); } }