Problem with fminsearch error

Hi I am trying to use fminsearch and i keep getting the following error:Attempt to execute SCRIPT fminsearch as a function, any idea?

 Respuesta aceptada

Star Strider
Star Strider el 12 de Jul. de 2016

2 votos

You have a script somewhere named ‘fminsearch’. This is called ‘overshadowing’ of built-in MATLAB functions, and should be avoided.
Run this line:
q = which('fminsearch', '-all')
It should only return these two lines (or something similar for your system):
q =
'C:\Program Files\MATLAB\R2016a\toolbox\matlab\optimfun\fminsearch.p'
'C:\Program Files\MATLAB\R2016a\toolbox\matlab\optimfun\fminsearch.m'
The solution is to rename your script file.

2 comentarios

Nikos P
Nikos P el 12 de Jul. de 2016
thank you very much!
Star Strider
Star Strider el 12 de Jul. de 2016
My pleasure!
If my Answer solved your problem, please Accept it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 12 de Jul. de 2016

Comentada:

el 12 de Jul. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by