Sine fitting
- Resample x, y if samples are not equidistant
- Estimate the offset by the mean of all y values.
- Build the FFT with heavy zero padding.
- Take the frequency, amplitude and phase of the largest FFT peak.If the frequency is at the Nyquist limit or the period is less than one, add extra frequencies for evaluation. Add also frequencies that have a peak value larger than 0.8 of the max. peak.
- Take those values as initial values for the regressions.
- Exclude results above Nyquist frequency.
- Take the resulting MSE as rating.
- Depending on the number of samples and the MSE, set a limit for accepted amplitude in relation to the FFT amplitude.
- If the amplitude from regression is higher than the accepted amplitude, take the FFT parameters.
Citar como
Peter Seibold (2025). Sine fitting (https://www.mathworks.com/matlabcentral/fileexchange/66793-sine-fitting), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- Control Systems > Control System Toolbox > Linear Analysis > Time and Frequency Domain Analysis > Frequency-Domain Analysis >
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
SinFit2WithConfidenceInterval
Versión | Publicado | Notas de la versión | |
---|---|---|---|
3.2.1 | Fixed a bug in the demonstration GUI |
||
3.2.0 | A version with output of confidence intervals, sinFit2 is included. Requires a toolbox. |
||
3.1.0 | Works also with non equidistant samples |
||
3.0.2 | Some changes in sineFitDemo in respect to 'run xy.mat' |
||
3.0.1 | Minor changes |
||
3.0.0 | No toolbox required anymore |
||
2.1 | Simplified code, faster processing, improved to work down to 0.1 periods, some more correct detections. |
||
2.0.0.1 | Image changed |
||
2.0.0 | Totally new approach with Fourier transformation results as initial parameters for fitting function. |
||
1.0.0.1 | Description corrected |
||
1.0.0.0 | spelling |