View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Matrix Inversion by Gaussian Reduction

Hi Dana,
I took this to be a simple curve fitting exercise

In A2:A19 the values 10, 30, 50, 70 etc
In B2:B19 the values 0.87, 0.8, 1, 1, etc
We return to column C soon
In E1:E10 the next: coeff0, coeff1,....coeff10
In F1:F10 the value 1 in each cell
Select E1:F10 and create names for the F values
In C1 the formula
=coeff0+coeff1*COS(A2)+coeff2*COS(A2*2)+coeff3*COS (A2*3)+coeff4*COS(A2*4)+coeff5*COS(A2*5)+coeff6*CO S(A2*6)+coeff7*COS(A2*7)+coeff8*COS(A2*8)+coeff9*C OS(A2*9)+coeff10*COS(A2*10)
Copy down the column
In H1 the formula =SUMXMY2(B2:B19,C2:C19) to compute the sum of squares of
deviations
Solver: minimize H1 by changing the coeff values

The ssd is too high - a plot of shows only a fair degree of agreement
between data in B with that in C. Might need to add more coeff

I feel a little awkward telling you how to do something - your math skills
far exceed those a chemist

best wishes

--
Bernard
"Dana DeLouis" wrote in message
...
Hi. May I ask how you set this up? I'm a little lost.
I was expecting a n*n array. I guess I don't understand the setup thou.
I noticed that the Abs values of the Fourier coefficients are close to
what you have. Is the OP trying to do a 1-dimensional Cos Trig fit?
These are not phased together by the angles given, just the abs values.

0.88611111,
0.018898028,
0.13342994,
0.064291005,
0.015228924,
0.064608047,
0.018986675,
0.0075864187,
0.0035608633,
0.021666667

= = =
Dana DeLouis

Bernard Liengme wrote:
Hi Dave,
I used Solver and got these results
coeff0 0.872399
coeff1 0.01781
coeff2 0.006306
coeff3 -0.01764
coeff4 0.024949
coeff5 0.124181
coeff6 0.138704
coeff7 0.067487
coeff8 -0.03891
coeff9 -0.01647
coeff10 0.078441


The sum of deviations squared was 0.091386
Send me email (remove TRUENORTH.) and I will send you a file
best wishes