-
Notifications
You must be signed in to change notification settings - Fork 0
/
York.h
executable file
·46 lines (41 loc) · 1.3 KB
/
York.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/***********/
/* Defines */
/***********/
#define kMaxLineLength 200
#define kZeroByte 0
#define eps 1e-10
#define pi 3.14159265
#define lamb232 4.9475e-11
#define lamb235 9.8485e-10
#define lamb238 1.55125e-10
/***********************/
/* Global Definitions */
/***********************/
double wtx[300], wty[300], w[300], b, xbar, ybar;
//double x[100], y[100], errx[100], erry[100];
//size_t N;
/***********************/
/* Struct Declarations */
/***********************/
typedef struct
{
float mswd;
float inclination;
float inclErr;
float intersect;
float interErr;
float age;
float ageErr;
} Fitdata;
/********************************/
/* Function Prototypes - main.c */
/********************************/
double ApaAge( double, double, double);
double CalcThStar( double, double, double);
void Flush( void );
double setThStarErr(double age, float thContent, float thErr, float uContent, float uErr, float thStar);
float setApaAgeError(float age, float pbErr, float thStarErr);
Fitdata DoYorkRegression( float *x, float *y, float *errx, float *erry , size_t N);
float CalcNewSlope(float lastSlope, float *x, float *y, size_t N);
float InitialSlope(float *x, float *y, float *errx, float *erry, size_t numberOfData); // Linear regression with least square minimation
//void W_Mean( void );