Four-Parameter Sinefit
by Marko Neitola
06 Mar 2009
(Updated 08 Sep 2011)
Least squares sinusoid fit. Optimization toolbox not needed. Data can be non-uniformly sampled.
|
Watch this File
|
| File Information |
| Description |
Least squares sinusoid fit algorithm described in IEEE Standard for Digitizing Waveform Recorders (IEEE Std 1057): Algorithm for three-parameter and four-parameter least squares fit to sinewave data using matrix operations.
The algorithm is (in most cases) really quick. If the signal frequency is a guess, it has to be close to true frequency value.
For further information, consult IEEE Std 1057 and/or IEEE Std 1241 documentation. |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
Modulo Time Plot
|
| MATLAB release |
MATLAB 7.6 (R2008a)
|
| Other requirements |
None. Should work on older MATLAB versions. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 18 Mar 2009 |
A minor bugfix in the plotting operation: now ALL samples are included in modulo-time plots. |
| 18 Aug 2010 |
A feature update: added a possibility to fit non-iteratively. |
| 26 Aug 2011 |
Improved iteration convergence: the accuracy for the initial frequency guess is more relaxed. |
| 08 Sep 2011 |
Fixed a bug in input parameter handling (varargin behavior). |
|
Contact us at files@mathworks.com