LSQCURVEFIT gives this error: Not enough input arguments.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Vladimiro Boselli
el 6 de Nov. de 2017
Respondida: Vladimiro Boselli
el 6 de Nov. de 2017
I have the following code in two separate .m file in the same folder running on Matlab 2015a:
function Test
I=[1 2 3 5; 2.1 2.9 3 4; 3 3 4.1 4; 5 3.5 5.2 6];
P=[1 2 3 4; 2 3 4 5; 4 5 6 7; 5 6 7 8];
x0=[2, 3]
x = lsqcurvefit(modelP,x0,I,P)
end
function [h]=modelP(x,I)
h=x(1)*I+x(2)*1.5
end
Running test it gives me the following error:
Error using modelP (line 2)
Not enough input arguments.
Error in Test (line 5)
x = lsqcurvefit(modelP,x0,I,P)
I cannot figure out why. Can someone help me, please?
2 comentarios
mounika
el 6 de Nov. de 2017
may be this will help: https://in.mathworks.com/matlabcentral/answers/85061-not-enough-input-arguments
mounika
el 6 de Nov. de 2017
Also, looks like there is a bug reported on this (fix available): https://in.mathworks.com/support/bugreports/271002?s_tid=answers_rc2-2_p5_MLT
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Nonlinear Optimization 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!