Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
26
Добавлен:
02.05.2014
Размер:
2.07 Кб
Скачать
Program TAU;
Uses graph,crt;
label
m1;
Const
hmax=2;
Var
x:array[1..3000] of real;
x1,x2,x3,x4,x5,x6,x7,x8:real;
temp,y,x111,gd,gm,n,i,j:integer;
g,dt:real;
s:string[3];
text:string;
c:char;
prosto:boolean;

Begin
Clrscr;
dt:=0.01;
N:=3000;
{t:=0;}
x1:=0;x2:=0;x3:=0;x4:=0;x5:=0;x6:=0;x7:=0;x8:=0;
g:=1;
prosto:=true;
For i:=0 to N-1 do Begin
x1:=x1+dt*((-3.121)*x1-3.03*x2+6.02*x4+29.14*x5+74.65*x6+99.5*x7+57.19*x8);
x2:=x2+dt*x1;
x3:=x3+dt*(0.1182*x1+0.4545*x2-6.667*x3);
x4:=x4+dt*(-x3-7.08*x4-27.55*x5-64.32*x6-86.43*x7-55.89*x8);
x5:=x5+dt*(x4);
x6:=x6+dt*x5;
x7:=x7+dt*x6;
x8:=x8+dt*(x7+0.7114);
x[i+1]:=x1*0.1882+0.455*x2{*(1.081)+x2(4.354)+x3*(24.28)+x4*()};
Writeln('x[',i+1,']=',x[i+1]);
If prosto=true then Begin
c:=Readkey;
Case c of
'c':exit;
'r':prosto:=false;
end;
end;
end;
str(x[N]:5:5,text);

GD:=Detect; GM:=2;
Initgraph (GD,GM,'C:\BP\BGI');
SetBkColor(White);
j:=1;
Setcolor(9);
For i:=1 to 6 do Line(20+60*i,450,20+60*i,450-400);
For i:=0 to 4 do Begin {“б«®ўЁҐ ­ ¤ЇЁбЁ ­  ®бЁ Y}
str(i,s);
Setcolor(1);
OuttextXY(10,450-100*i,s);
Setcolor(9);
Line (20,450-100*i,620,450-100*i);
end;
Setcolor(9);
Line(20,50,20,450);
Line(20,450,620,450);
moveto(20,450);
for i:=0 to 600 do Begin {Џ®бв஥­ЁҐ Ја дЁЄ }
setcolor(4);
y:=round(1000*x[j]);
x111:=i;
SetLineStyle(0,0,1);
Lineto(x111+20,450-y);
SetLineStyle(0,0,1);
{If i mod 2=0 then j:=j+1;}
j:=j+4;
if (i=0) or (i mod 60 = 0) then Begin {“б«®ўЁҐ ­ ¤ЇЁбЁ ­  ®бЁ X}
setcolor(9);
temp:=round(i/60);
str(temp,s);
Line(20+i,450,20+i,450-400);
setcolor(1);
Moveto(300,240);
Outtext(text);
Moveto(20+i,460);
Outtext(s);
setcolor(4);
moveto(20+x111,450-y);
end;

End;
Readkey;
CloseGraph;
end.
Соседние файлы в папке Курсовая работа МХ