MATLAB Application won't close

43 visualizaciones (últimos 30 días)
Bryan aguilar
Bryan aguilar el 25 de Jun. de 2025
Comentada: Vidhi Agarwal el 30 de Jun. de 2025
I am trying to close down MATLAB R2022b but as will give the error below in the command window. This has not happened before and now the only way to close down the app is through task manager. I have located the finish.m file in my directory which seems fine. Not sure if this is a onedrive issue either as this morning i tried syncing some new onedrive files, but I'm unsure how to fix this.
Warning: "C:\Users\Bryan\OneDrive - Knights - University of Central Florida\Documents\MATLAB" not found in path.
> In rmpath (line 71)
In finish (line 51)
Index in position 1 exceeds array bounds. Index must not exceed 1.
Error in finish (line 74)
path(path, wup);
>>
  2 comentarios
Walter Roberson
Walter Roberson el 25 de Jun. de 2025
It sounds as if at the point with the problem, path has somehow become a variable. finish is probably a script rather than a function, and scripts are executed in the same context as the invoking function... in the case of exiting the code, the context is probably the base workspace. So you probably have a variable named path in your base workspace.
Vidhi Agarwal
Vidhi Agarwal el 30 de Jun. de 2025
Following are the steps that can help you to resolve the issue:
  • Before closing MATLAB run following command and then try closing MATLAB normally.
clear path
  • Check the Base workspace for a "path" variable, by the following command:
whos path
  • Try cleaning up the MATLAB path, using the given below commands:
restoredefaultpath
rehash toolboxcache
savepath
Try avoiding to use variable names that shadow important MATLAB functions: path, sum, mean, etc.
Hope this helps!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by