Смекни!
smekni.com

Вероятностные процессы и математическая статистика в автоматизированных системах (стр. 5 из 5)

edit14.Text:=floattostrf(xmin[1],fffixed,5,2);

edit15.Text:=floattostrf(xmin[2],fffixed,5,2);

edit16.Text:=floattostrf(ymin,fffixed,5,2);

edit17.Text:=floattostrf(xmax[1],fffixed,5,2);

edit18.Text:=floattostrf(xmax[2],fffixed,5,2);

edit19.Text:=floattostrf(ymax,fffixed,5,2); end;

1: begin yy:=10; ymax:=0; ymin:=48;

label40.Caption:='x2=';

label41.Caption:='x1min='; label42.Caption:='x3min=';

label44.Caption:='x1max='; label45.Caption:='x3max=';

while yy<=48 do

begin xxx[1]:=-1;

while xxx[1]<=1 do

begin xxx[3]:=-1;

while xxx[3]<=1 do

begin if abs(fy(xxx[1],px,xxx[3])-yy)<=0.02

then series4.AddXY(xxx[1],xxx[3]);

if fy(xxx[1],px,xxx[3])<=ymin then

begin xmin[1]:=xxx[1]; xmin[3]:=xxx[3];

ymin:=fy(xxx[1],px,xxx[3]);end;

if fy(xxx[1],px,xxx[3])>=ymax then

begin xmax[1]:=xxx[1]; xmax[3]:=xxx[3];

ymax:=fy(xxx[1],px,xxx[3]);end;

xxx[3]:=xxx[3]+0.005; end;

xxx[1]:=xxx[1]+0.005; end;

yy:=yy+1.5; end;

series5.AddXY(xmax[1],xmax[3]); series6.AddXY(xmin[1],xmin[3]);

edit14.Text:=floattostrf(xmin[1],fffixed,5,2);

edit15.Text:=floattostrf(xmin[3],fffixed,5,2);

edit16.Text:=floattostrf(ymin,fffixed,5,2);

edit17.Text:=floattostrf(xmax[1],fffixed,5,2);

edit18.Text:=floattostrf(xmax[3],fffixed,5,2);

edit19.Text:=floattostrf(ymax,fffixed,5,2); end;

2: begin yy:=10;

ymax:=0; ymin:=48;

label40.Caption:='x1=';

label41.Caption:='x2min='; label42.Caption:='x3min=';

label44.Caption:='x2max='; label45.Caption:='x3max=';

while yy<=48 do

begin xxx[2]:=-1; while xxx[2]<=1 do begin xxx[3]:=-1;

while xxx[3]<=1 do begin if abs(fy(px,xxx[2],xxx[3])-yy)<=0.02

then series4.AddXY(xxx[2],xxx[3]);

if fy(px,xxx[2],xxx[3])<=ymin then

begin xmin[3]:=xxx[3];xmin[2]:=xxx[2];

ymin:=fy(px,xxx[2],xxx[3]);end;

if fy(px,xxx[2],xxx[3])>=ymax then

begin xmax[3]:=xxx[3]; xmax[2]:=xxx[2];

ymax:=fy(px,xxx[2],xxx[3]);end;

xxx[3]:=xxx[3]+0.005; end;

xxx[2]:=xxx[2]+0.005; end;

yy:=yy+1.5; end;

series5.AddXY(xmax[2],xmax[3]); series6.AddXY(xmin[2],xmin[3]);

edit14.Text:=floattostrf(xmin[2],fffixed,5,2);

edit15.Text:=floattostrf(xmin[3],fffixed,5,2);

edit16.Text:=floattostrf(ymin,fffixed,5,2);

edit17.Text:=floattostrf(xmax[2],fffixed,5,2);

edit18.Text:=floattostrf(xmax[3],fffixed,5,2);

edit19.Text:=floattostrf(ymax,fffixed,5,2);

end; end;end;

procedure TForm1.Button3Click(Sender: TObject);

var i:integer; max,min:mas;

maxy,miny:real;

begin series7.Clear;

for i:=1 to 3 do

xh[i]:=xh[i]+0.02;

max[1]:=series1.MaxYValue;max[2]:=series2.MaxYValue;

max[3]:=series3.MaxYValue; min[1]:=series1.MinYValue;

min[2]:=series2.MinYValue; min[3]:=series3.MinYValue;

maxy:=max[1]; miny:=min[1];

for i:=2 to 3 do begin

if max[i]>=maxy then maxy:=max[i];

if min[i]<=miny then miny:=min[i];

end;

case radiogroup1.ItemIndex of

0: begin

edit9.Text:=floattostr(xh[1]);

edit10.Text:=floattostr(fy(xh[1],strtofloat(edit1.Text),strtofloat(edit2.Text)));

edit11.Text:=floattostr(fy(xh[1],strtofloat(edit3.Text),strtofloat(edit4.Text)));

edit12.Text:=floattostr(fy(xh[1],strtofloat(edit5.Text),strtofloat(edit6.Text)));

series7.AddXY(xh[1],maxy); series7.AddXY(xh[1],miny); end;

1: begin

series7.AddXY(xh[2],maxy); series7.AddXY(xh[2],miny);

edit9.Text:=floattostr(xh[2]);

edit10.Text:=floattostr(fy(strtofloat(edit1.Text),xh[2],strtofloat(edit2.Text)));

edit11.Text:=floattostr(fy(strtofloat(edit3.Text),xh[2],strtofloat(edit4.Text)));

edit12.Text:=floattostr(fy(strtofloat(edit5.Text),xh[2],strtofloat(edit6.Text))) end;

2: begin series7.AddXY(xh[3],maxy); series7.AddXY(xh[3],miny);

edit9.Text:=floattostr(xh[3]);

edit10.Text:=floattostr(fy(strtofloat(edit1.Text),strtofloat(edit2.Text),xh[3]));

edit11.Text:=floattostr(fy(strtofloat(edit3.Text),strtofloat(edit4.Text),xh[3]));

edit12.Text:=floattostr(fy(strtofloat(edit5.Text),strtofloat(edit6.Text),xh[3]))

end; end;end;

procedure TForm1.Button4Click(Sender: TObject);

var i:integer; max,min:mas;

maxy,miny:real;

begin series7.Clear;

for i:=1 to 3 do

xh[i]:=xh[i]-0.02;

max[1]:=series1.MaxYValue; max[2]:=series2.MaxYValue;

max[3]:=series3.MaxYValue; min[1]:=series1.MinYValue;

min[2]:=series2.MinYValue; min[3]:=series3.MinYValue;

maxy:=max[1]; miny:=min[1];

for i:=2 to 3 do begin

if max[i]>=maxy then maxy:=max[i];

if min[i]<=miny then miny:=min[i]; end;

case radiogroup1.ItemIndex of

0: begin edit9.Text:=floattostr(xh[1]);

edit10.Text:=floattostr(fy(xh[1],strtofloat(edit1.Text),strtofloat(edit2.Text)));

edit11.Text:=floattostr(fy(xh[1],strtofloat(edit3.Text),strtofloat(edit4.Text)));

edit12.Text:=floattostr(fy(xh[1],strtofloat(edit5.Text),strtofloat(edit6.Text)));

series7.AddXY(xh[1],maxy); series7.AddXY(xh[1],miny); end;

1: begin series7.AddXY(xh[2],maxy); series7.AddXY(xh[2],miny);

edit9.Text:=floattostr(xh[2]);

edit10.Text:=floattostr(fy(strtofloat(edit1.Text),xh[2],strtofloat(edit2.Text)));

edit11.Text:=floattostr(fy(strtofloat(edit3.Text),xh[2],strtofloat(edit4.Text)));

edit12.Text:=floattostr(fy(strtofloat(edit5.Text),xh[2],strtofloat(edit6.Text))) end;

2: begin series7.AddXY(xh[3],maxy); series7.AddXY(xh[3],miny);

edit9.Text:=floattostr(xh[3]);

edit10.Text:=floattostr(fy(strtofloat(edit1.Text),strtofloat(edit2.Text),xh[3]));

edit11.Text:=floattostr(fy(strtofloat(edit3.Text),strtofloat(edit4.Text),xh[3]));

edit12.Text:=floattostr(fy(strtofloat(edit5.Text),strtofloat(edit6.Text),xh[3])) end; end;end;

end.