Frankpendegrass
Programmer
I have tables of data stored as text files. There are four variables, a, b, c and d, which eventually produce a thermodynamic property, e. Thus, z = fn(a,b,c,d,e). The text files that contain the data are arranged in columns with headers.
Problem is, interpolation; so far, i've been using linear interpol but the accuracy isn't good enaff. I have to do quadratic interpolation in all four dimensions (to obtain 'e') to increase the accuracy.
So far, I have tried defining the polynomial equation (from which I will get the matrix co-efficients (alphas)) as,
z(i) = alpha1*a*b + alpha2*a*c + alpha3*a*d + alpha4*b*c + alpha5*b*d + alpha6*c*d + alpha7*asquared + alpha8*bsquared + alpha9*csquared + alpha10*dsquared + alpha11*a + alpha12*b + alpha13*c + alpha14*d + alpha15
Where alpha15 is the constant.
I did it this way coz it's meant to be quadratic.
Question; am I right ?
Thanks in advance.
Problem is, interpolation; so far, i've been using linear interpol but the accuracy isn't good enaff. I have to do quadratic interpolation in all four dimensions (to obtain 'e') to increase the accuracy.
So far, I have tried defining the polynomial equation (from which I will get the matrix co-efficients (alphas)) as,
z(i) = alpha1*a*b + alpha2*a*c + alpha3*a*d + alpha4*b*c + alpha5*b*d + alpha6*c*d + alpha7*asquared + alpha8*bsquared + alpha9*csquared + alpha10*dsquared + alpha11*a + alpha12*b + alpha13*c + alpha14*d + alpha15
Where alpha15 is the constant.
I did it this way coz it's meant to be quadratic.
Question; am I right ?
Thanks in advance.