ГО СТ Р 56047— 2014
function gp = PO_gp (fcN. NF. W)
df= 1/ NF;
к = floor (fcN / df);
dfN = min ((k+1) * df - fcN. fcN - к * df):
dfW = dfN * W:
gp = sin(pi * dfW) I (pi * dfW * (1 - dfW*2)):
function Lim = PQdataBoundary (WAV. Nchan, Starts. Ns)
PQ_L = 5:
Amax = 32768;
NBUFF = 2048;
PQ_ATHR = 200 * (Amax / 32768);
Lim(1)= -1:
is = StartS;
EndS = Starts + Ns -1;
while (is <= EndS)
Nf = min (EndS - is + 1. NBUFF):
x = PQgetData (WAV. is. Nf);
for (k = 0:Nchan-1)
Lim(1) = max (Lim(1), PQ_DataStart (x(k+1,:). Nf. PQ_L. PQ_ATHR));
end
if (Lim(1) >= 0)
Lim(1) = Lim(1) ♦ is;
break
end
is = is + NBUFF - (PQ_L-1);
end
Lim(2) = -1;
is = StartS;
while (is <= EndS)
Nf = min (EndS - is + 1. NBUFF);
ie = is + Nf - 1;
js = EndS - (ie - Starts + 1) ♦ 1;
x = PQgetData (WAV.js. Nf):
for (k = 0:Nchan-1)
Lim(2) = max (Lim{2). PQ_DataEnd (x(k+1.:). Nf. PQ_L. PQ_ATHR));
end
if (Lim(2) >= 0)
Lim(2) = Lim(2) + js;
break
end
is = is + NBUFF - (PQ_L-1);
end
if (- ((Lim(1) >= 0 & Lim(2) >= 0) | (Lim(1) < 0 & Lim(2) < 0)))
error (’» > PQdataBoundary: limits have difference signs’);
end
if {-(Lim(1) <= Lim(2)))
error f» > PQdataBoundary: Lim(1) > Lim(2)’);
end
if (Lim(1) < 0)
Lim(1) = 0;
Lim(2) = 0;
end
%
------
function ib = PQ_DataStart (x. N. L. Thr)
84
ib = -1;
s = 0;