Export Fourier series coefficient into workspace variables

1 回表示 (過去 30 日間)
ludovico
ludovico 2015 年 9 月 18 日
回答済み: André Ivaniski Mello 2020 年 1 月 7 日
Hi guys, i need to export the results from a Fourier series a0,a1,b1 into variables of the workspace, in order to further elaborate them. If i use the CFTOOL manually there is no problem, since i can save this data output easily. The problem comes when i try to do it in textcode from the editor, since i have to postprocess a huge amount of data files and was trying to generate a code to do this process automatically. For the Fourier series i am using the following code:
[fitobject]=fit(var1,var2,'fourier1') [fitresult,gof]=fitobject(a0,a1,b1)
with a0,a1,b1 as global var. Thx to those willing to help a disperate newby :D

採用された回答

Hamoon
Hamoon 2015 年 9 月 19 日
a0 = fitobject.a0;
a1 = fitobject.a1;
b1 = fitobject.b1;
w = fitobject.w;

その他の回答 (1 件)

André Ivaniski Mello
André Ivaniski Mello 2020 年 1 月 7 日
f1 = fit(x,y,fourier2);
coeffs = coeffvalues(f1);

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by