Error in fsolve r2014b
Mostrar comentarios más antiguos
I try to use the fsolve command in a MATLAB code, and when i run it i get the following message:
Undefined function 'fsolve' for input arguments of type 'char'.
Error in Steam_func (line 39) res = fsolve('sft2_NC',x0)
I am using the MATLAB R2014b version on a MAC.
I have tried to run the code on another computer with R2013a installed, and here it works fine.
Do anyone know this problem?
Respuestas (1)
Geoff Hayes
el 27 de Nov. de 2014
Kasper - please verify that you have the Optimization Toolbox on this version of MATLAB by typing ver in the Command Window or which fsolve -all. The former will return your version of MATLAB and all installed toolboxes, while the latter will return the location of any functions that match fsolve.
If you do have access to this function, try changing the first input from a string to a function handle instead. So your code would become
fsolve(@sft2_NC,x0)
2 comentarios
Kasper
el 27 de Nov. de 2014
John D'Errico
el 27 de Nov. de 2014
Editada: John D'Errico
el 27 de Nov. de 2014
Indeed, you do not have that TB installed. Check your license online at TMW to see if you have bought that toolbox. If not, you either need to buy the optimization toolbox, or accept that you cannot use what you don't own. There are tools on the file exchange. Of course, sometimes you get what you pay for. And most of what you will find on the file exchange for this purpose are pretty simple Newton's method tools, many of which will require you to provide the gradient yourself.
Categorías
Más información sobre Platform and License en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!