uses crt;
const
m=4; n=3; nb=12;
var
j, p, q, t, lm:integer;
zm, l, s, zv_r, zv_i:array[1..m-1] of real;
Z_r, Z_i:array[0..m-1] of real;
D_r, D_i, SR, SI:array[1..n-1, 1..m-1] of real;
B_r, B_i:array[1..n-1, 0..m-1] of real;
xr_i, xr_r, x_i, x_r:array[0..nb-1] of real;
{---------------------------------------------}
begin clrscr;
for p:=1 to m-1 do
s[p]:=0;
for p:=1 to m-1 do
for q:=0 to n-1 do
s[p]:=s[p]+1/(16*exp(4*ln(sin((pi*(p+m*q))/nb))));
for p:=1 to m-1 do
l[p]:=n/s[p];
writeln('lambda p');
for p:=1 to m-1 do
writeln(l[p]:4:1); writeln;
{-----------------------------------------------}
for j:=1 to m-1 do
readln(zm[j]);
Z_r[0]:=0; Z_i[0]:=0;
for j:=1 to m-1 do
Z_r[0]:=Z_r[0]+zm[j];
for p:=1 to m-1 do begin
Z_r[p]:=0; Z_i[p]:=0;
end;
for p:=1 to m-1 do
for j:=1 to m-1 do begin
Z_r[p]:=Z_r[p]+cos(2*pi*p*j/m)*zm[j];
Z_i[p]:=Z_i[p]+sin(2*pi*p*j/m)*zm[j];
end;
writeln('Z(p)');
for p:=1 to m-1 do
writeln(Z_r[p]:6:2, ' ', Z_i[p]:6:2); writeln;
{-------------------------------------------------}
for p:=1 to m-1 do begin
zv_r[p]:=l[p]*Z_r[p];
zv_i[p]:=l[p]*Z_i[p];
end;
42
writeln('Z s volnoy');
for p:=1 to m-1 do
writeln(zv_r[p]:6:2, ' ', zv_i[p]:6:2); writeln;
{---------------------------------------------------}
for t:=1 to n-1 do
for p:=1 to m-1 do begin
SR[t, p]:=0; SI[t, p]:=0; end;
for t:=1 to n-1 do
for p:=1 to m-1 do
for q:=0 to n-1 do
SR[t, p]:=SR[t, p]+cos((2*pi*q*t)/n)/(16*exp(4*ln(sin((pi*(p+m*q))/nb))));
SI[t, p]:=SI[t, p]+sin((2*pi*q*t)/n)/(16*exp(4*ln(sin((pi*(p+m*q))/nb))));
for t:=1 to n-1 do
for p:=1 to m-1 do
D_r[t, p]:=SR[t, p]*cos((2*pi*q*t)/nb)-SI[t, p]*sin((2*pi*q*t)/nb);
D_i[t, p]:=SR[t, p]*sin((2*pi*q*t)/nb)+SI[t, p]*cos((2*pi*q*t)/nb);
writeln; writeln('Matriza D');
for t:=1 to n-1 do begin writeln;
for p:=1 to m-1 do
write(D_r[t, p]:5:1);
end;
writeln;
for t:=1 to n-1 do begin writeln;
for p:=1 to m-1 do
write(D_i[t, p]:5:1);
end;
{-----------------------------------------------}
for t:=1 to n-1 do
for p:=1 to m-1 do begin
B_r[t, p]:=zv_r[p]*D_r[t, p];
B_i[t, p]:=zv_i[p]*D_i[t, p];
end;
for t:=1 to n-1 do begin
B_r[t, 0]:=Z_r[0];
B_i[t, 0]:=Z_r[0];
end;
writeln; writeln('Matriza B');
for t:=1 to n-1 do begin writeln;
for p:=0 to m-1 do
write(B_r[t, p]:5:1); writeln;
end;
writeln;
for t:=1 to n-1 do begin writeln;
for p:=0 to m-1 do
write(B_i[t, p]:5:1); writeln;
end;
{-----------------------------------------------}
for t:=1 to n-1 do
43
for lm:=0 to m-1 do begin
x_r[t+lm*n]:=0;
x_i[t+lm*n]:=0;
end;
for t:=1 to n-1 do
for lm:=0 to m-1 do
for p:=0 to m-1 do begin
x_r[t+lm*n]:=x_r[t+lm*n]+B_r[t, p]*cos(2*pi*p*lm/m);
x_i[t+lm*n]:=x_i[t+lm*n]+B_i[t, p]*sin(2*pi*p*lm/m);
xr_r[t+lm*n]:=x_r[t+lm*n]/m;
xr_i[t+lm*n]:=x_i[t+lm*n]/m;
end;
writeln; writeln('Re x*', ' ', 'Im x*');
for j:=0 to nb-1 do
writeln(xr_r[j]:4:1, ' ', xr_i[j]:4:1);
readkey;
end.
44
Список литературы
В.Н.Малоземов, С.М.Машарский. Основы дискретного гармонического анализа. – СПб:, НИИММ, 2003 г.
А.Н. Колмогоров, С. В. Фомин. Элементы теории функции и функционального анализа. – М:, Наука, 1976 г.
А. Г. Курош. Курс высшей алгебры. – М:, Наука, 1971 г.
В. С. Шипачев. Высшая математика. – М:, Высшая школа, 2003 г.
Г. А. Магомедов, М. М. Сиражудинов, Р. К. Рагимханов. Теория функций комплексного анализа. – Махачкала:, ИПЦ ДГУ, 2003 г.