注册 登录
编程论坛 Delphi论坛

怎么将stringgrid中的数据取出,然后按公式计算再由图形显示

yuutian 发布于 2010-11-02 21:42, 803 次点击
大家好,我的stringgrid中有大量的数据
    我现在只想取出其中的两列数据,并将取出的
       数据进行计算,然后将结果绘出图形。
从stringgrid中取出的代码并进行计算的是
var
   coef0,coef1:double;
   i,j:integer;
begin
     for i:=2 to 3 do
begin
     for j:=1 to 20 do
begin
if  i=2  then
     coef0:=strtofloat(stringgrid2.Cells[2,j])
else
     coef1:=strtofloat(stringgrid2.Cells[3,j]);
     memo1.text:=floattostr(coef0-coef1);
end;
end;
end;
然而结果只显示一个结果
还有就是怎么将计算的数据再由图形显示出来呢???????????????
 
0 回复
1