?? xspctrm.c
字號:
/* Driver for routine spctrm */
#include <stdio.h>
#include "nr.h"
#include "nrutil.h"
#define M 16
#define TRUE 1
#define FALSE 0
main()
{
int j,k,ovrlap;
float *p,*q;
FILE *fp;
p=vector(1,M);
q=vector(1,M);
if ((fp = fopen("spctrl.dat","r")) == NULL)
nrerror("Data file spctrl.dat not found\n");
k=8;
ovrlap=TRUE;
spctrm(fp,p,M,k,ovrlap);
rewind(fp);
k=16;
ovrlap=FALSE;
spctrm(fp,q,M,k,ovrlap);
fclose(fp);
printf("\nSpectrum of data in file spctrl.dat\n");
printf("%13s %s %5s %s\n"," ","overlapped "," ","non-overlapped");
for (j=1;j<=M;j++)
printf("%3d %5s %13f %5s %13f\n",j," ",p[j]," ",q[j]);
free_vector(q,1,M);
free_vector(p,1,M);
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -