/* Calc. R matrix with C13 obs. data per mil based on Deng's formular */ #include #include #include #include int main() { int s,yy,m,c; int vy,vm; float vc,wv; // float vc13sd[74][13],sg[74]; char ls_fn[80],x3_fn[98]; //,x2_fn[98] FILE *x3_ptr,*ls_ptr; //*x2_ptr, sprintf(ls_fn,"../c13uncrtn_R73permil04.txt"); if ((ls_ptr=fopen(ls_fn, "w")) == NULL) { printf("\n Unable to open listing file, exitting program ...\n\n"); exit(0); } sprintf(x3_fn,"../c13uncrtn_R73permil.txt"); if ((x3_ptr=fopen(x3_fn, "r")) == NULL) { printf("\n Unable to open stdev file, exitting program ...\n\n"); exit(0); } for (s=1;s<=3066;s++) { fscanf(x3_ptr,"%f\n",&vc); wv=(float)(vc*0.4); fprintf(ls_ptr,"%f\n",wv); } fclose(x3_ptr); fclose(ls_ptr); return 1; }