Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11712

Re: genfit / guess values

$
0
0

See the attached worksheet.

 

Your fitted function is the sum of three sinusoids, each with an amplitude and a frequency (but no phase terms in any of them). If you know those amplitudes and frequencies you can calculate the b coefficients. The amplitudes and frequencies can be found by performing a Fourier transform on the data and finding the positions and heights of the peaks. To do that you will have to normalize both of the axes after the FT. The maximum value on the frequency axis is half your sampling frequency for the data. I am not inclined to spend the time required to examine your program that generates the "data" to figure out what that is. The normalization for the amplitude axis depends on which FFT routine you use, but for CFFT it's sqrt(N) (see the help for more information). The coefficients found via the FT may be good enough for you, but if not they will at least be very accurate guesses for the least squares fit.

 

Note that your fitting function assumes a phase of zero for all three cosine functions. I didn't check your data to see if that's actually the case, but you should (even if only to check for an accidental phase caused by a programming error).


Viewing all articles
Browse latest Browse all 11712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>