Attempting to use the command "fit", even for a very simple data set returns: Undefined function 'fit' for input arguments of type 'double'.
typing cftool returns not available.
Anyone know why or how to fix this? I am running MATLAB off a cluster, not a personal computer if that makes a difference.
Sorry if the question is silly. ;/

댓글 수: 4

Geoff Hayes
Geoff Hayes 2014년 6월 6일
The function fit is from the Curve Fitting Toolbox ( http://www.mathworks.com/help/curvefit/fit.html). In the Command Window, type ver too list your version of MATLAB and toolbox information to see if you have this toolbox.
Darya
Darya 2014년 6월 6일
Is the curve fitting toolbox part of another toolbox like statistics or optimization?
Geoff Hayes
Geoff Hayes 2014년 6월 6일
No, it is its own Toolbox. See Star Strider's solution below for alternatives to the fit function.
Star Strider
Star Strider 2014년 6월 6일
No. The Curve Fitting Toolbox is a separate Toolbox.
The Statistics Toolbox function nlinfit fits vector dependent variables but has all the statistics you’ll likely ever need.
The Optimization Toolbox function lsqcurvefit can fit matrix dependent variables and allows parameter constraints, but doesn’t have access to all the statistics.

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2014년 6월 6일

1 개 추천

If you need to fit data and don’t have access to the Curve Fitting Toolbox, see if you have the Statistics Toolbox or the Optimization Toolbox. Those both have good curve fitting functions.
To see if you have these, type:
which nlinfit -all
which lsqcurvefit -all
in the MATLAB Command Window.
If all else fails, you can use fminsearch.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

질문:

2014년 6월 6일

댓글:

2014년 6월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by