CSkin博客
标题:
如何遍历一个点对数组里的点对的点?
[打印本页]
作者:
redstone8415
时间:
2023-10-28 13:20
标题:
如何遍历一个点对数组里的点对的点?
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++;
}
}
这样打印不出来!
欢迎光临 CSkin博客 (http://bbs.cskin.net/)
Powered by Discuz! X3.2