Borrar filtros
Borrar filtros

Error in matlab app with a code

5 visualizaciones (últimos 30 días)
Maria
Maria el 25 de Mzo. de 2023
Respondida: Tushar el 17 de Abr. de 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)

Respuestas (1)

Tushar
Tushar el 17 de Abr. de 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!!

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by