Why do I get the error "Undefined function or variable 'onCleanup'"?
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everybody. Opening programs I get this error:
Undefined function or variable 'onCleanup'.
Error in getnicedialoglocation (line 21)
c = onCleanup(@() close(convertData.hFig));
Error in msgbox (line 324)
DefFigPos = getnicedialoglocation(DefFigPos, get(figureHandle,'Units'));
Error in errordlg (line 47)
handle = msgbox(ErrorStringCell,DlgName,'error',Replace);
Error in uiopen (line 194)
errordlg(err);
What can I do to solve the problem and start using Matlab again?
0 commentaires
Réponses (2)
ES
le 30 Mai 2017
Something is wrong with your path.
onCleanUp resides here. It should be visible on startup.
{MATLAB Installation Directory}\toolbox\matlab\general\onCleanup.m
Try
which onCleanup
restoredefaultpath
commands
0 commentaires
Jan
le 30 Mai 2017
The first point to start is asking the docs about this function. In the current version found on the MathWorks pages (and found by Google):
There it is mentioned, that the function was "Introduced in R2008a". Do you run an older version? Then it would be useful, if you mention this.
0 commentaires
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!