Failure in initial objective function evaluation. FMINUNC cannot continue.
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kelechi Emerole
el 19 de Nov. de 2019
Comentada: Star Strider
el 15 de Ag. de 2020
I tried to evaluate this function but I am getting this error Failure in initial objective function evaluation.
FMINUNC cannot continue.
Please what is the best way to evaluate this function
f = x(2)^2*x(9)^2 + x(2)^2*x(9) + x(2)^3*x(9) - x(3)*x(5)*x(9)^2 + x(6)*x(8)*x(9)^2 + x(6)*x(8)*x(9)^3 + x(2)*x(6)*x(8)*x(9)^2;
0 comentarios
Respuesta aceptada
Star Strider
el 19 de Nov. de 2019
Unless it is already in a function file, it needs to be an anonymous function:
f = @(x) x(2)^2*x(9)^2 + x(2)^2*x(9) + x(2)^3*x(9) - x(3)*x(5)*x(9)^2 + x(6)*x(8)*x(9)^2 + x(6)*x(8)*x(9)^3 + x(2)*x(6)*x(8)*x(9)^2;
If it is in a function file (and you have passed the function handle to fminunc correctly), the initial parameter estimates could be the problem. Please post those.
9 comentarios
Mohammed Ouallal
el 15 de Ag. de 2020
Editada: Bruno Luong
el 15 de Ag. de 2020
It seems that you resolve the problem but did not show how! please be kind and share the complete solution.
Thank you for the understanding!
Star Strider
el 15 de Ag. de 2020
Yes, I did!
‘Unless it is already in a function file, it needs to be an anonymous function’
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display 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!