Undefined function 'fit' for input arguments of type 'double'.

I have already downloaded curve fitting toolbox
as when i type
which fit
is returned
C:\Program Files\MATLAB\R2019b\toolbox\stats\stats\@gmdistribution\fit.m % gmdistribution method
but when i am trying to implement 'fit' function even in the following simple exampe i have an error
x=[1;4;10];
y=[2;4;6];
a=fit(x,y,'poly1');
and the error i have is:
>> Untitled
Undefined function 'fit' for input arguments of type
'double'.
Error in Untitled (line 3)
a=fit(x,y,'poly1');

回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 26 日
編集済み: madhan ravi 2020 年 7 月 26 日

0 投票

You don’t have the license for it.

6 件のコメント

Georgios Tsimplis
Georgios Tsimplis 2020 年 7 月 26 日
Thank you for your response.
So what should i do?
Georgios Tsimplis
Georgios Tsimplis 2020 年 7 月 26 日
I have the license because i type
ver % in command window , check whether you have Statistics and Machine Learning Toolbox
license('checkout','Curve_Fitting_Toolbox') % if it returns 1 then you have a valid license
and i have back
ans =
1
madhan ravi
madhan ravi 2020 年 7 月 26 日
>> which fit -all
/MATLAB/toolbox/curvefit/curvefit/fit.m
/MATLAB/toolbox/stats/stats/@gmdistribution/fit.m % gmdistribution method
madhan ravi
madhan ravi 2020 年 7 月 26 日
Seems like you don’t have the “Curve Fitting Toolbox” .
Georgios Tsimplis
Georgios Tsimplis 2020 年 7 月 26 日
編集済み: Georgios Tsimplis 2020 年 7 月 26 日
Yeah but why is this happening to me..?
what should i do?
i am a univesity student and i can download the full version of matlab 2020a..should i do something like this?
madhan ravi
madhan ravi 2020 年 7 月 26 日
Go to Adds-On and download the toolbox from there.

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

質問済み:

2020 年 7 月 26 日

コメント済み:

2020 年 7 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by