?»??»?/* This function use non linear method calculate parameters for arrhenius equation */ //#include "stdafx.h" #include #include #include #include //#include "tools.h" #define kOVERh 2.083674e+10 //#define kb=3.16683e-6 double matinv(double **a, int n); void functn(int n, int m, double *a, double * x, double *f, double **g); void arrhenius(int n, int m, double *a, double *x, double *y); double matinv(double **a, int n); double *dvector(long num); void free_dvector(double *vec); double **dmatrix(long nrow, long ncol); void free_dmatrix(double **matr); int main (int argc, char * argv[]){ double a[3]; double x[]={300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 2000, 2500}; double y[]={5.16E-04, 1.12E+01, 4.79E+03, 2.83E+05, 5.40E+06, 5.01E+07, 2.87E+08, 1.18E+09, 3.74E+09, 9.89E+09, 2.26E+10, 4.59E+10, 8.50E+10, 7.45E+11, 2.76E+12}; double kb=3.16683e-6; int i; a[0] = log(kOVERh); a[1] = 0.0001; a[2] = 0.0462833/kb; int n=15; int m=3; for (i=0;i= fabs(a[j][k])) continue; irow=j; icolum=k; amax = fabs(a[j][k]); } } if(amax <= tol){ d = 0.0; return d; } ipv[icolum][2] = 1; ipv[i][0] = irow; ipv[i][1] = icolum; if(irow != icolum) { for(l=0;l