Need a little help with polynomial regression fitting in Mathcad 15
- March 30, 2024
- 3 replies
- 3689 views
Background:
Although unimportant to my question, I am trying to resurrect a Filon Method of Fourier Transforms that I used over 30 years ago in a Fortran code (see my profile😕). I am in the first steps, which require that I develop a polynomial fit to the function to be transformed. Another function will not work in this method.
My quandaries:
Attached is a Mathcad 15 code for the first steps of this process. You will also need the subroutine called; it is attached also. I searched the PTC Community and found this reference:
It states that the coefficients of the polynomial fit are the result of the regress(x,y,order) function. However, that cannot be correct as I show in my worksheet.
- Is this the difference between Mathcad 15 and Prime? My Prime version is very old and and I not very experienced with it.
- If that is not the case, how do I get the actual coefficients of the polynomial fit?
Just FYI: The fit is not particularly good, but that is not my question now. If I change the order to 16, it fits the exact expression better up to about 5x105 Hz, but with more oscillations around zero at the higher frequencies. Again, not my question at this time, Also, FFTs do not work particularly well for such broadband signals over so many decades of time and frequency...the reason to desire a Filon method.
For some reason, I no longer get notified of replies. I have not changed any settings. So, I will check back for any replies.
Thanks much for any help.
Reg

