📄 exportoutput.cpp
字号:
#include "parameter_sets.h"
int ExportOutputF(struct BasicParaS * ctrl, double * throughPut,double * numOper)
{
int i;
FILE * fpOut = fopen("Output.dat", "w");
fprintf(fpOut, "This is the statistic data of Output ..\n");
printf("\n");
for (i=0; i<59; i++)
printf("*");
printf("\n");
printf("This is the statistic data of Output ..\n");
if (ctrl->noiseMode == 0)
{
for (i=0; i<ctrl->totalNumFrames; i++)
{
fprintf(fpOut, "When Eb_No is %.2fdB, the throughPut is %E\n", ctrl->Eb_No[i], *(throughPut+i));
fprintf(fpOut, " the number of operations is %E\n", *(numOper+i));
printf("When Eb_No is %.2fdB, the throughPut is %E\n", ctrl->Eb_No[i], *(throughPut+i));
printf( " the number of operations is %E\n", *(numOper+i));
}
}
else
{
for (i=0; i<ctrl->totalNumFrames; i++)
{
fprintf(fpOut, "When SNR is %.2fdB, the throughPut is %E\n", ctrl->Eb_No[i], *(throughPut+i));
fprintf(fpOut, " the number of operations is %E\n", *(numOper+i));
printf("When SNR is %.2fdB, the throughPut is %E\n", ctrl->Eb_No[i], *(throughPut+i));
printf( " the number of operations is %E\n", *(numOper+i));
}
}
fclose(fpOut);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -