Fourier Series Fitting using Fit function

17 visualizaciones (últimos 30 días)
Mustafa Al-Nasser
Mustafa Al-Nasser el 9 de Dic. de 2021
Respondida: Gautam el 20 de Feb. de 2024
Dear All;
There is a command to fit different fucntion to data , this command called "Fit" which is also used to fit data to fourier series but when i check types of functions that command fit data into , i could find " fourier3 ... fourier8" and even when i check "Fit" function code i could not find it , any one can helo why is not shown in code and how can i get it?

Respuestas (1)

Gautam
Gautam el 20 de Feb. de 2024
Hello, Mustafa
You can use the “fit” function to fit a Fourier model to your data by following the ode format below
f = fit(x, y, 'fourier2');
where the parameters x and y are the data points and the parameter ‘fourier2’ specifies the type of function to be used to fit the data.
The fit function supports the Fourier model type 'fourier1', 'fourier2'… up to 'fourier8' as of release R2021a.
You can find more examples on fitting a Fourier model to data from the “Fit Fourier Models Using the fit Function” section of the document below:
  1. Fourier Series: https://www.mathworks.com/help/releases/R2021a/curvefit/fourier.html?searchHighlight=fourier%20series&s_tid=doc_srchtitle
Thank You,
Gautam

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by