< -->

Program Fourier_Transforms;
{$L C:\PROGRA~2\BP70\BIN\EGAVGA.OBJ}
Uses Graph, CRT;
Procedure EGAVGA; External;
const
  dimArr = 1000;
  dimFV = 640;
  dx = 640/dimArr;
  dy = 240/65536;
  dy1 : Real = 230/65536;
  dx1 = 640/dimFV;
  _Pi_ : Real = 3.1415926535897932384626433832795;
var
  Val : array[0..dimArr] of Integer;
  FrqVal : array[0..dimArr-1] of Real;
  SmIm, SmRe, MaxF : Real;
  i, j: Word;
  D, R, e : Integer;
Function Max(Ar : array of Real) : Word;
var
  Mx : Word;
  j : Word;
begin
  Mx := 0;
  for j := 1 to dimArr-1 do
   if Ar[Mx]0 then
    dy1 := 230/MaxF
  else dy1 := 230/65535;
  MoveTo(0, 479-Round(dy1*FrqVal[i]));
  SetColor(LightRed);
  for i := 0 to dimFV do
    LineTo(Round(dx1*i), 479-Round(dy1*FrqVal[i]));
{  FillChar(FrqVal, dimArr*2, 0);
  for i := 0 to dimFV do
    begin
      Sm := 0.0;
      for j := 0 to dimArr do
        Sm := Sm + cos(_Pi_*i*j/dimArr)*Val[j];
      FrqVal[i] := Abs(Sm);
    end;
  MaxF := FrqVal[Max(FrqVal)];
  dy1 := 230/MaxF;
  MoveTo(0, 479-Round(dy1*FrqVal[i]));
  SetColor(LightGreen);
  for i := 0 to dimFV do
    LineTo(Round(dx1*i), 479-Round(dy1*FrqVal[i]));}
  ReadKey;
  CloseGraph;
end.

Назад