ГО СТ Р 56047— 2014
%
--------
function it = PO_LThresh (Thr, NRef. NTest)
Np = length (NRef):
it = Np;
for (i = 0:Np-1)
if (NRef(i+1) > Thr & NTest(i+1) > Thr)
it = i;
break:
end
end
function BW = PQmovBW (X2)
persistent kx kl FR FT N
if (isempty (kx))
NF = 2048;
Fs = 48000:
fx = 21586:
kx = round (fx / Fs * NF): %921
fl = 8109;
kl = round (fl / Fs ‘ NF); % 346
FRdB = 10;
FR = 10*(FRdB / 10);
FTdB = 5:
FT = 10A(FTdB / 10);
N = NF / 2;% Limit from pseudo-code
end
Xth = X2(2.kx+1);
for (k = kx+1:N-1)
Xth = max (Xth. X2(2.k+1));
end
BW.BWRef = -1;
XthR = FR * Xth:
for (k = kx-1:-1:kl+1)
if (X2(1,k+1)>= XthR)
BW.BWRef = к + 1:
break:
end
end
BW.BWTest = -1;
XthT = FT * Xth;
for (k = BW.BWRef-1:-1:0)
if (X2(2.k+1) >= XthT)
BW.BWTest = к + 1;
break;
end
end
function MDiff = PQmovModDiffB (M. ERavg)
persistent Nc Ete
if (isempty (Nc))
e = 0.3:
(Nc. fc} = POCB (’Basic’);
Et = PQIntNoise (fc);
for (m = 0:Nc-1)
Ete(m+1) = Et(m+1)*e;
end
end
42