extracting data points after fitting

what i did is...i loaded file in command window...defined x and y parameters...
load test.dat x=test(:,1); y=test(:,2); cftool
den i opened cftool
in this window i used "interpolate" in fitting options...which gives an overplot on my original data thus giving me now a continous fitted curve...below it is residual(about 0)... now i want the data points of this fitted curve...how will i do it...??

1 件のコメント

Ahmed Alotaibi
Ahmed Alotaibi 2021 年 3 月 17 日
Aditi,
Have you solved this yet?

サインインしてコメントする。

回答 (2 件)

David Sanchez
David Sanchez 2013 年 12 月 11 日

0 投票

Save the fitting in the workspace, then:
my_pol = [fitting.p1 fitting.p2]; % insert the parameters from your fitting
X = 0:0.1:10; % define your x data here
Y = polyval(my_pol,X); % your Y data
aditi
aditi 2013 年 12 月 11 日

0 投票

thanks for replying. i saved the fit in workspace with following names:
save fit to MATLAB object name: fittedmodel2
save goodness of fit to MATLAB struc named: goodness2
save fit output to MATLAB struct named: output2
now what should i do..?? last two commands are not clear to me...m new to MATLAB maybe thats y... :(
also since m fitting with interpolant...there are no parameters I want data points of the fit curve..i.e the new curve

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

質問済み:

2013 年 12 月 11 日

コメント済み:

2021 年 3 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by