ГОСТ Р 56047—2014
extern double "(С:
int
modulatton(dooble ‘E2. int rate, struct modulationin ’in. double *Mod)
{
int k;
double T. a;
for(k=0;k<bark;k++) {
T = (double)Tmin + (double)(100/’fC[k])*(double)(T100- Tmin);
a = exp((double)-HANN/(2*rate * T));
in->Edertmp{k] = in->Edertmp(k]’a+(1-a)*(double)(rate/(HANN.’2})
•module(p(E2[k], 0.3) - p(in->E2tmp{k]. 0.3));
ir>->E2tmp{k] = E2[k}:
irv>Etildetmp{k] = a*in->EtikJetmp[k]+(1-a)‘p<E2[k]. 0.3);
Mod[k] = in->Edertmp[kl/(1 + (in->Etildetmp[k]i‘0.3));
}
return 0;
}
Файл: neural.h
«define sig(x) (double}(1.0/(1.0 + exp<(doubleHx))))
«define 111
«define J 3
struct outframes {
double WinModDifflb;
double AvgModDifMb;
double AvgModDiff2b:
double RmsNoiseLoudb;
double BandwidthRefb;
double BandwidthTeslb:
double TotaINMRb;
double RelDistFramesb:
double ADBb;
double MFPDb;
double EHSb:
>:
struct out {
double ODG;
double Dl:
}:
/’ Function prototypes V
struct out neural(struct outframes processed);
/’ Prototypes end V
Файл: neural.c
«include <stdlS).h>
«include <math.h>
«include <common.h>
«include <neural.h>
double amin{11j = {393.916656. 361.965332, -24.045116, 1.110661.-0.206623,
0.074318. 1.113683. 0.950345. 0.029985. 0.000101. 0.0};
double amax(11] = {921.0. 881.131226.16.212030. 107.137772. 2.886017.
13.933351. 63.257874.1145.018555. 14.819740. 1.0. 1.0};
double wx[12][3J = {{-0.502657. 0.436333. 1.219602}.
{4.307481.3.246017. 1.123743}.
{4.984241, -2.211189. -0.192096}.
{0.051056. -1.762424.4.331315}.
81