File Exchange

image thumbnail

HARMFIT: Sinusoidal harmonic curve fitting

version 1.0.0.0 (3.04 KB) by François Beauducel
Computes harmonics of a phase signal

15 Downloads

Updated 28 May 2014

View License

This is the core formula of discrete Fourier transform: it simply computes the amplitude and phase shift of fundamental or harmonics of a phase signal.
Example:
t = linspace(0,2*pi);
x = 2*cos(t + pi/2) - cos(3*t) + rand(size(t));
harmfit(t,x,1:4)

returns estimations of amplitudes/phases for the first four harmonics.

Comments and Ratings (1)

Dear François Beauducel; I have made HARMFIT to my timeseries data set. I want to get the get the equation of this fitted equation. How can i get the equation of this fitted equation with all coefficients?

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux