Undefined function 'fsolve' for input arguments of type 'function_handle'

10 views (last 30 days)
Using Matlab 2013b, I run the code and I get the following error:
Undefined function 'fsolve' for input arguments of type 'function_handle'.
Error in f_FBGtool (line 117)
[Y_solTX,F_f_iter_QEM,exitflag,output]=fsolve(@f_iter_QEM,Vguess,options,p1,p2,...
Error in Main_FBGtool_flows (line 101)
[Tb,comp(i,:),GY(i,:),LHVg(i,:),CC(i,:),EFh(i),EFc(i),X_char(i),...
Calling the function:
%Calculation of main species and T (iteration)
% options = optimset('Display','off','MaxFunEvals',10000,'MaxIter',1000000,'TolFun',1e-7);
options = optimset('Display','off');
[Y_solTX,F_f_iter_QEM,exitflag,output]=fsolve(@f_iter_QEM,Vguess,options,p1,p2,...
p3,p4,p5,p6,p7,p8,p9,p10);
if(exitflag<=0)
fprintf('Error de converg calculando TX en f_iter_QEM=%g\n',F_f_iter_QEM);
f_avisoerrfsolve(exitflag);
Function definition:
function Fout= f_iter_QEM(Yguess,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
Here are some mathematical calculations,
and the output:
Fout=[eQ eWGSR errC errH errO errN];
Thanks for your help

Answers (1)

Alan Weiss
Alan Weiss on 21 Feb 2014
It sounds as if you don't have Optimization Toolbox installed. You can check by entering
ver
at the MATLAB command line.
If you have an Optimization Toolbox license but somehow the product is not currently installed, then reinstall. You might want to contact Technical Support.
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Comments
Balasundaram Mohan
Balasundaram Mohan on 1 Sep 2017
I have the same problem when I am trying to run matlab code in my institute computing facility. I checked for the toolbox. It is available and I am attaching figure of it. Could please help me to sort this problem out?
Or can we load fsolve file separately and try to run and I am using ubuntu terminal to run matlab program ?
The exact command "{Undefined function 'fsolve' for input arguments of type 'function_handle'."
Walter Roberson
Walter Roberson on 1 Sep 2017
Balasundaram:
You have the software installed, but not necessarily licensed. What does
which -all fsolve
indicate?

Sign in to comment.

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!