ГОСТ Р 56047— 2014
for (j = 0:Nchan-1)
sR = sR + PQ_LinPosAvg (BW.BWRef(j+1.:));
sT = sT + PQ_LinPosAvg (BW.BWTest(j+1.:));
end
BandwidthRefB = sR l Nchan;
BandwidthTeslB = sT / Nchan,
(unction [WinModDifdB. AvgModDiffIB. AvgWodDiff2B] = PQ_avgModDif(B (Ndel. MDiff)
NF = 2048:
Nadv = NF / 2:
Fs = 48000;
Fss = Fs / Nadv;
tavg = 0.1;
[Nchan. Np] = size (MDiff.MtIB);
L = floor (tavg * Fss):
s = 0:
for (j = 0:Nchan-1)
s = s + PQ_WinAvg (L. MDiff.Mt1B(j+1.Ndel+1:Np-1-M));
end
WinModDifdB = s/Nchan;
s = 0;
for (j = 0:Nchan-1)
s = s + PQ_WtAvg (MDiff.Mt1B(j+1.Ndel+1:Np-1+1). MDiff.Wl(j+1.Ndel+1:Np-1+1));
end
AvgModDiffIB = s / Nchan;
s = 0;
for 0 = 0:Nchan-1)
s = s + PQ_WtAvg (MDiff.Mt2B(j+1,Ndet+1:Np-1 +1). MDiff.Wt(j+1,Ndel+1:Np-1+1));
end
AvgModDiff2B = s / Nchan;
function RmsNoiseLoudB = PQ_avgNLoudB (Ndel. NLoud)
[Nchan. Np] = size (NLoud.NL);
s = 0;
for (j = 0:Nchar>-1)
s = s + PQ_RMSAvg (NLoud.NL(j+1.Ndel+1:Np-1+1));
end
RmsNoiseLoudB = s / Nchan;
%-------------------------------------
function s = PQ_LinPosAvg (x)
N = length(x);
Nv = 0;
s = 0:
for (i = 0:N-1)
if (x(i+1) >= 0)
s = s + x(i+1);
Nv = Nv + 1;
end
end
if (Nv > 0)
s = s / Nv;
end
%
------
function Fd = PO_FractThr (Thr, x)
N = length (x):
39