fit function in Matlab 2020

14 visualizaciones (últimos 30 días)
Felipe Flores-Golfin
Felipe Flores-Golfin el 5 de Jun. de 2020
Respondida: Elizabeth Huaroc el 18 de En. de 2021
I'm trying to use the fit function (see example below), but keep getting this error "Check for missing argument or incorrect argument data type in call to function 'fit' "
% Code:
load census;
f=fit(cdate,pop,'poly')
%
I get the error even using this simple example, which is the same one that appears here Fit Help Doc
Thanks in advance for the help. I'm not sure how to fix this.

Respuestas (2)

Elizabeth Huaroc
Elizabeth Huaroc el 18 de En. de 2021
I had the same problem and after reviewing the following link, I realised that I didn't install the curve fitting toolbox when I updated my version of Matlab.Therefore, Matlab called "fit" from the stats toolbox function which has different input types. More details in the aswer of @Bernard Beitz in the link below. I changed from Matlab 2020a to 2020b and had to run the installer again for installing the missing toolboxes.

Navya Seelam
Navya Seelam el 8 de Jun. de 2020
poly is not a valid input argument for the fit function. Try using poly1 or poly2 for linear and quadratic fit respectively. For more valid fit types go through this link.
  5 comentarios
spencer Jordan
spencer Jordan el 21 de Dic. de 2020
Did anyone here solve this issue? I just updated to 2020a and now all the scripts I have that use 'fit' no longer work.
Jan Skerswetat
Jan Skerswetat el 7 de En. de 2021
Editada: Jan Skerswetat el 7 de En. de 2021
same error here with 2020b. My code works with 2019b version, but not with the 2020b. Using fit and 'gauss1'.

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by