ГОСТ Р 56047—2014
FILE ’fp;
int к;
#ifdef LOGALLFRAMES
fp = fopen(filename.*a+’):
#else
fp = fopen(filename.’v/’);
#endif
for(k=0;k<len;k++)
fprintf(fp."%g\n".var[k]);
fclose(fp);
return;
)
#endif
void
usage<char * name) Г Print usage */
{
fprintf(stderr. ’PEAO Algorithm. Giuseppe Gottardi ’oveRet™
■<gottardi-@ailinux.org>\n\n’ );
fprintf(stderr. "usage: %s <option>\n". name):
fprintf(stderr. “-r reffile[:lp) (Ip default = 92)\n"
’-l testfile[:lp] (Ip default = 92)\л"
" -h print this help\n");
exit (0):
)
Файл: bandwidth.h
#define ZEROTHRESHOLD 921
#define BwMAX 346
struct bandwidthout {
double sumBandvridthRefb;
int countref;
double sumBandvridthTestb;
int counttest:
double BandwidthRefb;
double BandwidthTestb;
}.
/* Function prototypes */
int bandwidth(double *. double *, int. struct bandwidthout ’);
/* Prototypes end 7
Файл: bandwidth.c
include <stdlib.h>
^include <math.h>
include <common.h>
include <bandwidth.h>
int
bandwidth(double ’ffttest. double ‘fftref. int hann.
struct bandwidthout ’out)
{
int k. BwRef = 0. BwTest = 0;
double Flevtest. Flevref:
double ZeroThreshold:
ZeroThreshold = 20.0 ’ tog10((double)ffttest[ZEROTHRESHOLD]);
for(k=ZEROTHRESHOLD:k<hann/2;k++) {
Flevtest = 20.0 ’ log10|(double)ffttest[kl);
65