D
davidxx
Unregistered / Unconfirmed
GUEST, unregistred user!
那位高手指点一下小弟写的程序
从txt文件中读数据,然后绘在chart上,但总是不对,不知那位高手能指点一下
if OpenDialog1.Execute then
begin
AssignFile(F1, OpenDialog1.Filename);
Reset(F1);
i:=0 ;
while not SeekEof(f1) do
begin
Readln(F1);
i:=i+1;
end;
setlength(signal,i,2);
reset(f1);
Readln(F1,signal[0,0],signal[0,1]);
max:=signal[0,1];
i:=1;
j:=0;
while not SeekEof(f1) do
begin
Readln(F1,signal[i,0],signal[i,1]);
series1.AddXY(signal[i,0],signal[i,1]) ;
if max<signal[i,1] then
begin
max:=signal[i,1];
j:=i
end;
i:=i+1;
end;
从txt文件中读数据,然后绘在chart上,但总是不对,不知那位高手能指点一下
if OpenDialog1.Execute then
begin
AssignFile(F1, OpenDialog1.Filename);
Reset(F1);
i:=0 ;
while not SeekEof(f1) do
begin
Readln(F1);
i:=i+1;
end;
setlength(signal,i,2);
reset(f1);
Readln(F1,signal[0,0],signal[0,1]);
max:=signal[0,1];
i:=1;
j:=0;
while not SeekEof(f1) do
begin
Readln(F1,signal[i,0],signal[i,1]);
series1.AddXY(signal[i,0],signal[i,1]) ;
if max<signal[i,1] then
begin
max:=signal[i,1];
j:=i
end;
i:=i+1;
end;