Four-Parameter Sinefit

Least squares sinusoid fit.
3.3K Downloads
Updated 4 Jan 2019

View License

IEEE Standard for Digitizing Waveform Recorders (IEEE Std 1057): Algorithm for least squares fit to sinewave data using matrix operations:
- three-parameter (known frequency, non-iterative) and
- four-parameter (general use, find frequency iteratively).

Added features:
- Complex sinusoid fit enabled.
- Alternative 4-parameter fit by using the function fminbnd.

Cite As

Marko Neitola (2024). Four-Parameter Sinefit (https://www.mathworks.com/matlabcentral/fileexchange/23214-four-parameter-sinefit), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Curve Fitting Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
2.0.0.0

Improvements and bug-fixes

1.5.0.0

A feature update: fitting extended to complex sinusoids.

1.4.0.0

Fixed a bug in input parameter handling (varargin behavior).

1.3.0.0

Improved iteration convergence: the accuracy for the initial frequency guess is more relaxed.

1.2.0.0

A feature update: added a possibility to fit non-iteratively.

1.1.0.0

A minor bugfix in the plotting operation: now ALL samples are included in modulo-time plots.

1.0.0.0