Extraction of parameters for a function

f(x)=(a0+a1*x+a2*x^2)/(b0+b1*x+b2*x^2) how to find the coefficients of a0,a1,a2,b0,b1,b2,b2 such that the above function behaves as cosine function,when 0<x<pi

 採用された回答

Birdman
Birdman 2018 年 4 月 9 日

0 投票

Firstly, define two vectors in your workspace:
x=0:0.01:pi;
y=cos(x);
Now, open Curve Fitting app and see the attached figure to see what to do.
Then, Click on Fit->Save to Workspace and save this model to your workspace by naming the save fit to MATLAB Object named to f. Then, you will have your model saved. If you type
plot(x,f(x))
you will see the plot that looks almost like a cosine. Hope this helps.

その他の回答 (1 件)

AYESHA FATIMA
AYESHA FATIMA 2018 年 4 月 23 日

0 投票

Hello Birdman Its not letting me save the fit to save work space after following the procedure

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

質問済み:

2018 年 4 月 9 日

回答済み:

2018 年 4 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by