Error in fsolve r2014b
4 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Geoff Hayes
on 27 Nov 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 Comments
John D'Errico
on 27 Nov 2014
Edited: John D'Errico
on 27 Nov 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.
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!