PointPair[] findcrosspoint(double[] fi, double[] fd, double _db, double _freq)
{ int i = 0,r=0,s=0;
PointPair[] crosspoint = new PointPair[10];
PointPair pointpair = new PointPair();
DataPoint pt1 = new DataPoint();
DataPoint pt2 = new DataPoint();
for (i = 0; i < 299; i++)
{
if ((fd > _db) && (fd[i + 1] < _db))
{
pt1.SetValueXY(fi, fd);
pt2.SetValueXY(fi[i + 1], fd[i + 1]);
pointpair.prevpoint = pt1;
pointpair.nextpoint = pt2;
crosspoint.Append(pointpair);
for (i = 0; i < 10; i++)
{
if ((!crosspoint.prevpoint.IsEmpty) && (!crosspoint.nextpoint.IsEmpty))
{
richTextBox1.AppendText(crosspoint.prevpoint.ToString());
}
catch (InvalidOperationException e)
{
MessageBox.Show(e.Message);
}
}
r++;
}
}
这样打印不出来!
|