Home |
Search |
Today's Posts |
#17
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sadly, the reconstituted model f(A) does not go through, or in some
cases anywhere near, the observed values. I would have accepted close misses Hi. Just throwing something out. It appears that you are trying to work in the frequency domain based on your Cosine Matrix. It appears to me you want a solution with Cosine's only. If so, how about the Fourier equation? You can't get an exact fit without the Sin portion to give you the correct phase shift for each frequency. Here is the equation. Note that your 18 points are now numbered 0-17, and not 1-18. Sub Demo() Dim Pi As Double Dim j As Long For j = 0 To 17 Debug.Print j; CosFit(j) Next j End Sub Function CosFit(x) Dim Pi As Double Pi = [Pi()] CosFit = _ 0.886111111111111 + _ 0.018898028106003 * Cos(0.724019780381624 - (Pi * x) / 9) + _ 0.133429937703512 * Cos(2.32511875642987 - (2 * Pi * x) / 9) + _ 6.42910050732863E-02 * Cos(0.679775646576795 + (Pi * x) / 3) + _ 0.01522892397659 * Cos(1.81176681414226 - (4 * Pi * x) / 9) + _ 6.46080465147374E-02 * Cos(1.59530802116179 + (5 * Pi * x) / 9) + _ 1.89866749895945E-02 * Cos(1.99286012557845 + (2 * Pi * x) / 3) + _ 7.58641866384528E-03 * Cos(0.708758198743175 + (7 * Pi * x) / 9) + _ 3.56086325212297E-03 * Cos(2.77704553008904 - (8 * Pi * x) / 9) + _ 2.16666666666666E-02 * Cos(Pi * x) End Function Note that your 18 points are divided into 360 (ie 2 Pi/18 - Pi/9) Here are the results: 0 0.87 1 0.8 2 1 3 1 4 0.98 5 0.98 6 0.98 7 0.75 8 0.65 9 0.69 10 0.97 11 0.98 12 1 13 0.98 14 0.95 15 0.73 16 0.77 17 0.87 Which match what you wanted for the output: f(A) = {0.87,0.8,1,1,0.98,0.98,0.98,0.75,0.65,0.69,0.97,0 .98,1,0.98,0.95,0.73,0.77,0.87} Probably not useful, but I thought I would mention it. = = = Dana DeLouis |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Gaussian Curve using Normdist? | Excel Worksheet Functions | |||
Reduction Fractions to LCD | Excel Discussion (Misc queries) | |||
data inversion! | Excel Worksheet Functions | |||
Gaussian Elimination | Excel Worksheet Functions | |||
need help with a formula - % reduction | New Users to Excel |