Метод математического моделирования

Автор работы: Пользователь скрыл имя, 27 Апреля 2012 в 11:57, курсовая работа

Краткое описание

Моделирование в научных исследованиях стало применяться еще в глубокой древности и постепенно захватывало все новые области научных знаний: техническое конструирование, строительство и архитектуру, астрономию, физику, химию, биологию и, наконец, общественные науки. Большие успехи и признание практически во всех отраслях современной науки принес методу моделирования ХХ в.

Содержимое работы - 1 файл

ДОС КУРС.docx

— 241.54 Кб (Скачать файл)

StrToFloat(StringGrid2.Cells[1,0])*StrToFloat(stringgrid1.Cells[1,0])+

StrToFloat(stringgrid2.Cells[2,0])*StrToFloat(stringgrid1.Cells[2,0])+

StrToFloat(stringgrid2.Cells[2,1])*StrToFloat(stringgrid1.Cells[2,1])+

StrToFloat(stringgrid2.Cells[3,1])*StrToFloat(stringgrid1.Cells[3,1])+

StrToInt(stringgrid2.Cells[4,1])*StrToFloat(stringgrid1.Cells[4,1]);

edit15.Text:=FloatToStr(L);

end; 

procedure TForm1.BitBtn2Click(Sender: TObject);

const U2=0;

begin

form1.Edit18.Text:=floattostr((strtofloat(StringGrid2.Cells[2,1]))-U2);

form1.Edit19.Text:=floattostr((strtofloat(StringGrid2.Cells[3,1]))-U2);

form1.Edit20.Text:=floattostr((strtofloat(StringGrid2.Cells[4,1]))-U2);

form1.Edit22.Text:=floattostr((strtofloat(StringGrid2.Cells[2,0]))-strtofloat(form1.Edit18.Text));

form1.Edit16.Text:=floattostr((strtofloat(StringGrid2.Cells[0,0]))-strtofloat(form1.Edit22.Text));

form1.Edit17.Text:=floattostr((strtofloat(StringGrid2.Cells[1,0]))-strtofloat(form1.Edit22.Text));

form1.StringGrid3.Cells[0,0]:=form1.StringGrid2.Cells[0,0];

form1.StringGrid3.Cells[1,0]:=form1.StringGrid2.Cells[1,0];

form1.StringGrid3.Cells[2,0]:=form1.StringGrid2.Cells[2,0];

form1.StringGrid3.Cells[2,1]:=form1.StringGrid2.Cells[2,1];

form1.StringGrid3.Cells[3,1]:=form1.StringGrid2.Cells[3,1];

form1.StringGrid3.Cells[4,1]:=form1.StringGrid2.Cells[4,1];

form1.StringGrid3.Cells[3,0]:='4';

form1.StringGrid3.Cells[4,0]:='1';

form1.StringGrid3.Cells[0,1]:='4';

form1.StringGrid3.Cells[1,1]:='4';

memo1.visible:=true;

end; 
 

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;

  Rect: TRect; State: TGridDrawState);

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=0)and(ARow=0)) then

  StringGrid1.Canvas.FillRect(Rect);

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=1)and(ARow=0)) then

  StringGrid1.Canvas.FillRect(Rect);

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=0)) then

  StringGrid1.Canvas.FillRect(Rect);

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=3)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=4)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

  end;

{begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=1)and(ARow=0)) then

  StringGrid1.Canvas.FillRect(Rect);

end;

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=0)) then

  StringGrid1.Canvas.FillRect(Rect);

end;

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

end;

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=3)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

end;

begin

StringGrid1.Canvas.Brush.Color:=clRed;

if ((ACol=4)and(ARow=1)) then

  StringGrid1.Canvas.FillRect(Rect);

end;}

end;

procedure TForm1.StringGrid3DrawCell(Sender: TObject; ACol, ARow: Integer;

  Rect: TRect; State: TGridDrawState);

begin

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=0)and(ARow=0)) then

  StringGrid3.Canvas.FillRect(Rect);

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=1)and(ARow=0)) then

  StringGrid3.Canvas.FillRect(Rect);

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=0)) then

  StringGrid3.Canvas.FillRect(Rect);

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=2)and(ARow=1)) then

  StringGrid3.Canvas.FillRect(Rect);

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=3)and(ARow=1)) then

  StringGrid3.Canvas.FillRect(Rect);

StringGrid3.Canvas.Brush.Color:=clRed;

if ((ACol=4)and(ARow=1)) then

  StringGrid3.Canvas.FillRect(Rect);

end;

end. 
 
 
 
 
 
 
 
 
 
 


Информация о работе Метод математического моделирования