Matlab not recognizing 'fit' function

조회 수: 13 (최근 30일)
Clayton
Clayton 2023년 3월 10일
댓글: Stephen23 2023년 3월 10일
When I attempt to use the curve fitting toolbox function 'fit', I get the following error: Unrecognized function or variable 'fit'. I have installed the curve fitting toolbox and reinstalled Matlab itself a couple of times, but none of these seem to fix it. It is also a different error to the one generated when the toolbox isn't installed (which is something along the lines of "one of the following toolboxes is necessary to use the 'fit' function) so I know the toolbox is installed.
The only think I can think is that maybe there are multiple toolboxes with a fit function and it is getting confused, but then I would expect an error related to the actual syntax of a different fit function. If there isn't a way to resolve this error, is there at least a way to force it to reference the toolbox function?
Here is an image of the auto-generated live script from the curve fitting toolbox documentation to show the error.
Let me know if you know what is going on here.
Thanks!
  댓글 수: 3
Clayton
Clayton 2023년 3월 10일
Hey Stephen, Curve Fitting Toolbox is included in my license. I have double checked in the add-ons window and in my license details in my profile.
Torsten
Torsten 2023년 3월 10일
편집: Torsten 2023년 3월 10일
licence checkout Curve_Fitting_Toolbox
ver('Curve Fitting Toolbox')
What do you get as answers ?

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

채택된 답변

Stephen23
Stephen23 2023년 3월 10일
이동: John D'Errico 2023년 3월 10일
Have you or any third-party function or toolbox made any changes to the MATLAB search path? Call
and check the output of
which fit -all
  댓글 수: 2
Clayton
Clayton 2023년 3월 10일
이동: John D'Errico 2023년 3월 10일
Stephen, I'm not sure how to change the MATLAB search path or even what that means, but I made that call and the fit function is now working! It seems to have fixed it. Thank you for your help. Can you post that as an answer so I can mark it as correct?
Stephen23
Stephen23 2023년 3월 10일
"I'm not sure how to change the MATLAB search path or even what that means,"

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by