ГОСТ Р 56047— 2014
function [a. b] = PQtConst (И00. tmin, f . Fs)
N = length (f):
fof (m = 0:N-1)
t = tmin + (100 / f(m+1)) * (t100 - tmin);
a(m+1) = exp (-1 / (Fs * t));
b(m+1) = (1 - a(m+1));
end
function W2 = PQWOME (f)
N = length (f);
for (k = 0:N-1)
fkHz = f(k+1)/1000;
AdB = -2.184 * fkHzA(-0.8) + 6.5 * exp(-0.6 * (fkHz - 3.3^2)...
- 0.001 * 1кНгл(3.6):
W2(k+1) = 10fl(AdB / 10);
end
function WAV = PQwavFitePar (File)
persistent iB
if (isempty (iB))
iB = 0;
else
iB = mod (iB + 1, 2);
end
[size WAV.Fs Nbit] = wavread (File, ’size’):
WAV.Fname = File;
WAV.Nframe = size{1);
WAV.Nchan = size(2);
WAV.iB = iB;
PQgetData (WAV. 0. 0);
function MOV = PQavgMOVB (MOVC. Nchan. Nwup)
Fs = 48000;
NF = 2048:
Nadv = NF / 2;
Fss = Fs / Nadv:
tdel = 0.5;
tex = 0.050:
[MOV(0+1). MOV(1+1)l = PQ_avgBW (MOVC.BW);
% Total NMRB. RelDislFramesB
(MOV(2+1). MOV(10+1)J = PQ_avgNMRB (MOVC.NMR);
% WinModDiffIB. AvgModDiffIB. AvgModDiff2B
N500ms = ceil (tdel * Fss):
Ndel = max (0. N500ms - Nwup):
(MOV(3+1). MOV{6+1). MOV(7+1)] = PQ_avgModDiffB (Ndel. MOVC.MDiff);
% RmsNoiseLoudB
N50ms = ceil (tex * Fss):
Nloud = PQIoudTest (MOVC.Lood);
Ndel = max (Nloud + N50ms. Ndel):
MOV(8+1) = PQ_avgNLoodB (Ndel. MOVC.NLoud);
% ADBB. MFPDB
(MOV{4+1), MOV(9+1)] = PQ_avgPD (MOVC.PD);
% EHSB
MOV(5+1) = PQ_avgEHS (MOVC.EHS);
%--------------------------------------------
function EHSB = PQ_avgEHS (EHS)
37