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

25 visualizaciones (últimos 30 días)
I'm running the following code:
close all
clear
clc
x = [0:0.01:1];
A=[0.0; 0.2; 0.4; 0.6; 0.8; 1.0];
B=[0.0; 0.034; 0.12; 0.267; 0.5; 1.0];
f=fit(A,B,'poly2')
But it results in the following error:
Undefined function 'fit' for input arguments of type 'double'.
Error in filename (line 68)
f=fit(A,B,'poly2')
I checked that the folder is in the correct path.
Help is appreciated.

Respuesta aceptada

Guillaume
Guillaume el 23 de Dic. de 2018
Most likely you don't have the curve fitting toolbox installed or you don't have a license for it.
  6 comentarios
Georgios Tsimplis
Georgios Tsimplis el 26 de Jul. de 2020
Editada: Georgios Tsimplis el 26 de Jul. de 2020
I did it !!!! it works! thanks for your help!
madhan ravi
madhan ravi el 26 de Jul. de 2020
Georgios isn’t that what I told you in your question?

Iniciar sesión para comentar.

Más respuestas (1)

madhan ravi
madhan ravi el 23 de Dic. de 2018
What does the below show?
which fit -all
whos fit
  4 comentarios
Jochem
Jochem el 23 de Dic. de 2018
I do have it installed:
Statistics and Machine Learning Toolbox Version 11.3 (R2018a)
madhan ravi
madhan ravi el 23 de Dic. de 2018
So just follow my second option .

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing 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