?? testtable.c
字號(hào):
#include <stdio.h>#include <stdlib.h>#include <math.h>#include "tabledist.h"/* testtable nvalues mu sigma corr */main(int argc, char **argv){ double mu, sigma, corr; double newmu, newsigma, newcorr; int nvalues, value; InternalStats stats; int i, last; if (argc < 5) { fprintf(stderr, "Usage: testtable nvalues mu sigma corr\n"); exit(1); } nvalues = atoi(argv[1]); mu = atof(argv[2]); sigma = atof(argv[3]); corr = atof(argv[4]); if (nvalues < 0 || corr < -1.0 || corr > 1.0) { fprintf(stderr, "You blew it\n"); exit(1); } MakeDistributedStats(mu, sigma, corr, &stats); UnmakeDistributedStats(&stats, &newmu, &newsigma, &newcorr); /*printf("Values read: %10.6f %10.6f %10.6f\n", mu, sigma, corr); printf("Values used: %10.6f %10.6f %10.6f\n", newmu, newsigma, newcorr);*/ for (i=0; i < nvalues; ++i) { if (stats.intrho) { value = correlatedtabledist(&stats); } else value = tabledist(stats.intmu, stats.intsigma); if (value < 0.0) value = 0.0; printf("%10.6f\n", (double)value); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -