ГОСТ Р ИСО/МЭК 10373-6—2015
re lo se (sample_lile) ;
/*♦♦.*♦*.*♦♦* Displays Statistics ******«***«*******«**♦«*♦♦«**♦•»•*«***•»*******/
pr
xnt t C"\ n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*\n ">;
pzmtr ("Stat istics: \n"!;
print*<" Filename: \s\n",fname) ;
print£(" Sample count : ‘d\n",.i);
prmtf(” Sampling rate : »2.Q£ MHz\n",le-6/(vtimeJl]-vtuneI0]И
t
p n n t t ( "
Max(vrl)
: 4
.
0£
mVin*,max_vd*
10C0> ;
p rin t £(” Hin (vd> : *.4.0£ mV\n",min
_
va*10Q0>;
return i}
l
/♦**♦** EfiCi RfiidCfiV ***>*******•»****#****************************************************/
/♦ •« г***# ********************************************************************************/
/*** Write CSV File Function
• * * /
/*•* ***/
/ * * *
Description:
***/
/»*« This function writes m л CSV larmat. lile
***/
/*** the result ol LMA computation:
•**/
/*** Fist column - time(s)
***/
/*** second column - Upper side nand amplitude (V)
***/
/*** Third column - Lower side band amplitude (VI
***/
/...
•**/
/*•* Return: Number of written samples
***!
/***D II an error occurred
***/
/» » ...г...» ...» » ..» ...» » ..» ...» » ..» » ..» ...» » *.«»*.
***/
tnt wntecsvichar* Iname, int n_LMA,double LMA_t1meП ,double USB11,double LSB|))
int i;
FILE «out
_
file;
i£
((out_Iile - topen(£name, "к*»)•**■NULL)
I
print!("Cannot open output
tile
l.s.\n",lname>
;
return 0;
for U ‘0;Kn_LMA;tit)
I
fpnntc(out lile,"•-7.4E,*1.4E, •.7.4E\n",LMA_timeliJ,USB(1JfLSB|i]( ;
I
Iclose(out_Iile);
return i;
/
l
/*** siidingLMA : Load Modulation Amplitude versus Time
* * * /
/►*****************************************»**Ц|*****************************************у
/*** Description:
* * • /
/ * * *
This function calculat.es Upper side band and
* * * /
/*** Lower side nand amplitudes as a function oi time
* * . * / /
* * *• * * /
/»** Arguments:
* * • /
/ * * *
ic - carrier frequency (Hz)
* * * /
/»♦* count - number of Input signal samples
* * * /
/*** vLlme(| - input signal time array
* * * / /
* + •
vd[] - input signal voLtage array
* * * /
/*** lout - max. size of following arrays
• * * /
/*** LMA_time(] - Times to which LMAs are computed
* * * l
/*** USB(J - load modulation amplitude at fc+fs
• * * /
196