- Function not on path: Ensure all functions are on the MATLAB path during compilation. Test your app or function before you compile it.
- P-File Dependencies: Without the M-file source code, dependency analysis cannot detect dependencies for P-files. The tool mentioned in this MATLAB answer can help.
- String arguments: Functions used in strings passed to 'feval', 'eval', 'evalc', or as ODE solver arguments cannot be located by dependency analysis.
- Callback Strings: MATLAB Compiler does not look for functions in callback strings. Change the string reference to your function to a function handle.
Why do I get an "Unrecognized function" error when I run my MATLAB Compiler deployed standalone application?
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 31 de Ag. de 2024
Editada: MathWorks Support Team
el 31 de Ag. de 2024
I wrote MATLAB code or created an app in AppDesigner that runs without issues in MATLAB Desktop.
When I compile the app with MATLAB Compiler and deploy it, I get errors such as the following when I run the standalone application:
Unrecognized function or variable 'myFuncName'.
Undefined function or variable 'myFuncName'.
Reference to unknown function 'function_name' from FEVAL in stand-alone mode.
Why do I get these errors when running the compiled version of my application but not when I run it from MATLAB Desktop?
Respuesta aceptada
MathWorks Support Team
el 31 de Ag. de 2024
Editada: MathWorks Support Team
el 31 de Ag. de 2024
When you encounter an "unrecognized function", "undefined function", or "unknown function" error in a compiled MATLAB application, it typically indicates missing dependencies during the compilation process.
Common causes include:
To include any function dependencies explicitly, you can add %#function pragma statements to your code:
Refer to the "Callback Problems Due to Missing Functions" section on the following page for further details, examples, and workarounds for missing dependencies:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Application Deployment 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!