ГО СТ Р 56047— 2014
х = zeros (Nchan, N);
Nz = 0;
if 0 < 0)
Nz = min (-i. N):
i = i + Nz;
end
Ns = min (N - Nz, WAV.Nframe - i);
if (i >= 0 & Ns > 0)
x{1:Nchan.Nz+1:Nz+Ns-1+1) = Amax ’ (wavread (WAV.Fname. [i+1 i+Ns-1+1]))1;
end
function hw = PQHannWin (NF)
hw = zeros (1, NF);
for
(n
= 0:NF-1)
hw(n+1) = 0.5 * (1 - cos(2 * pi * n / (NF-1)));
end
function Fmem = PQinitFMem (Nc. PCinit)
Fmem.TDS.Ef(1;2.1;Nc) = 0;
Fmem.Adap.P(1:2,1:Nc) = 0;
Fmem,Adap.Rn(1;Nc) = 0;
Fmem.Adap.Rd(1;Nc) = 0;
Fmem.Adap.PC(1:2.1:Nc) = PCinit;
Fmem.Env.Ese(1;2.1;Nc) = 0;
Fmem.Env.DE(1:2.1:Nc) = 0;
Fmem.Env.Eavg(1:2.1;Nc) = 0;
function EIN = PQIntNoise (f)
N = length (f);
for (m = 0:N-1)
INdB = 1.456 * (f(m+1) / 1000)л(-0.8):
EIN(m+1) = 10A(INdB / 10);
End
function X = PORFFT (x. N. ifn)
if (ifn > 0)
X = fft (x, N);
XR = real{X(0+1;N/2+1));
XI = imag(X(1+1 :N/2-1+1));
X = [XR XI);
else
xR = [x(0+1:N/2+1)]:
xl = [0 x(N/2+1+1:N-1+1) 0].
x = complex ([xR xR(W2-1+1:-1:1+1)]. [xl -xl(N/2-1+1:-1;1+1)]);
X = real (ifft (x. N));
end
function X2 = PORFFTMSq (X. N)
X2 = zeros (1.N/2+1);
X2(0+1) = X(0+1)A2;
for (k = 1:N/2-1)
X2(k+1) = X(k+1 )A2 + X(N’2+k+1 )л2;
end
X2(N/2+1) = X(N/2+1)A2;
36