Fourier Series Fitting using Fit function

9 ビュー (過去 30 日間)
Mustafa Al-Nasser
Mustafa Al-Nasser 2021 年 12 月 9 日
回答済み: Gautam 2024 年 2 月 20 日
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?

回答 (1 件)

Gautam
Gautam 2024 年 2 月 20 日
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

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by