Error in matlab app with a code

4 views (last 30 days)
Maria
Maria on 25 Mar 2023
Answered: Tushar on 17 Apr 2023
Hello, nice to greet you. I hope you can help me with a problem that I am having and I have not been able to solve it, it is the following: I have a code in matlab that involves the fzero function, when I put numerical values ​​it runs perfectly, but I need to take it to matlab app and when I do not give it numerical values ​​if not the variables (letters) that I have in the application gives me an error and I don't know what else to do to be able to link it and that it can give me values ​​with the numbers that it enters in the application. Thank you so much
Error: Error using fzero>localFirstFcnEval
FZERO cannot continue because user-supplied function_handle ==> g failed with the error below.
Unrecognized function or variable 'Cao'.
Error in fzero (line 305)
fx = localFirstFcnEval(FunFcn,FunFcnIn,x,varargin{:});
xai = fzero(@g, 0)

Answers (1)

Tushar
Tushar on 17 Apr 2023
Hi,
The error which you are facing usually indicates that MATLAB cannot find a particular variable or MATLAB program file in the current directory or on the search path, in your case 'Cao'.
Possible solutions to this:
  • Verify Spelling of Function or Variable Name
  • Verify Inputs Correspond to the Function Syntax
  • Make Sure Function Name Matches File Name
  • Make Sure Necessary Toolbox Is Installed and Correct Version
  • Verify Path Used to Access Function Toolbox
  • Confirm The License Is Active
You can also have a look at the below mentioned MATLAB answer, to know more about possible reasons / solutions for the error you are facing.
Hope it helps!!

Categories

Find more on Get Started with MATLAB 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!