Why do I receive an error message - 'Specified key not found in container' - when running a MATLAB function after generating code for it using MATLAB Coder?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 23 de Sept. de 2016
Respondida: MathWorks Support Team
el 20 de Oct. de 2016
I am generating code for a MATLAB script using MATLAB Coder and this generates a MEX file. I find that the code generation is successful, but when I go back to run the script, I receive an error that says - 'Specified key not found in container'. Why does this happen?
Respuesta aceptada
MathWorks Support Team
el 23 de Sept. de 2016
This error occurred due to the incorrect compilation of the MEX file. In this case, because the original '.M' function was shadowed by the corresponding MEX file, calling the function resulted in the execution of the MEX file and led to the observed error. To resolve the error, perform the following steps:
1. Enter the following command in the Command window to locate the MEX file:
which -all <mexfilename>.<mexfile-extension>
NOTE - The <mexfile-extension> can be obtained by entering the "mexext" command at the MATLAB Command Window.
2. This command will output the path to the MEX file if it still exists. Navigate to the location of the MEX file and delete it.
3. Restart MATLAB and try running the function again. An alternative to restarting MATLAB would be to enter the command - 'clear mex' at the Command Window and then try running the function again.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!