Why am I getting the error "The specified superclass 'xyz' contains a parse error, cannot be found on MATLAB's search path, or is shadowed by another file with the same name."?

134 visualizaciones (últimos 30 días)
I am receiving the following error:
The specified superclass 'xyz' contains a parse error, cannot be found
on MATLAB's search path, or is shadowed by another file with the same name.
This error message can occur in many scenarios, for example, during MATLAB startup, when calling a MATLAB script or function, when creating a standalone application with MATLAB Compiler, or when executing a standalone application against MATLAB Runtime.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 8 de Oct. de 2022
Editada: MathWorks Support Team el 13 de Oct. de 2022
If you encounter the error message in MATLAB, generally, this error is received when there is a user-defined function in the MATLAB search path which has the same name as the MATLAB built-in function. In order to resolve the issue follow the troubleshooting steps below:
a) Manually go through the MATLAB search path and remove the paths which have functions conflicting with built-in MATLAB functions. Execute the following command to get the list of the current search path.
>> path
The following command may help to find the source of the issue:
>> which -all <conflicting_function>
b) If you are unsure of which paths to remove or the above command displays only one line, restore the MATLAB search path to its factory-installed state by executing the following command :
>> restoredefaultpath
Notice that the above command may remove the paths that you have previously added to the MATLAB search path in order for your scripts to work. So it is advisable to save a backup copy of the current MATLAB search path before running the command.
Refer to the following link to the documentation to back up the current search path: https://www.mathworks.com/help/matlab/ref/savepath.html
If you encounter the error message while executing a MATLAB standalone executable that was created using MATLAB Compiler, check if your system path points to the correct version of MATLAB Runtime (matching the MATLAB release and Update used for deployment), as explained in the following documentation: https://www.mathworks.com/help/compiler/mcr-path-settings-for-run-time-deployment.html

Más respuestas (0)

Categorías

Más información sobre Call MATLAB from C en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by