Regression learner app, unrecognized function at startup

I'm using Matlab R2022a and wanted to start the Regression Learner app for the first time. It comes back with errors:
Unrecognized function or variable 'isTextStrict'.
Error in erase (line 33)
if ~isTextStrict(str)
Error in mlearnapp.internal.ui.savesession.SessionSaveLoadController (line 108)
this.MATLABRelease = erase(versionInfo.Release, {'(',')'});
Error in mlearnapp.internal.model.ModelFactory/createSessionSaveLoadController (line 368)
sessionSaveLoadController = mlearnapp.internal.ui.savesession.SessionSaveLoadController(session, dialogFactory, problemDependentToolstripFactory, fileUtilities, appConfiguration);
Error in mlearnapp.internal.model.Session (line 168)
this.SessionSaveLoadController = this.ModelFactory.createSessionSaveLoadController(this, problemDependentToolstripFactory);
Error in mlearnapp.internal.model.SessionFactory/createSession (line 18)
session = mlearnapp.internal.model.Session(sessionFactory, modelFactory, metricFactory, validationPartitionFactory, modelList, poolContext, problemDependentToolstripFactory, mainThreadBusyTracker);
Error in regressionLearner (line 98)
session = sessionFactory.createSession(metricFactory, validationPartitionFactory, problemDependentToolstripFactory, mainThreadBusyTracker);
This seems bad for something that was never used? Any suggestions?
Rogier

 Réponse acceptée

Rogier Mars
Rogier Mars le 16 Déc 2022
Ah, restoredefaultpath helps.

5 commentaires

it didn't work for me
Error in erase (line 33)
if ~isTextStrict(str)
The function erase, toolbox/matlab/strfun/erase.m does not have 33 lines, so some other erase.m is getting invoked.
which -all erase
to check which erase is getting invoked.
it replied with this
>> which -all erase
C:\Program Files\MATLAB\R2024a\toolbox\matlab\strfun\erase.m
erase is a built-in method % string method
C:\Program Files\MATLAB\R2024a\toolbox\matlab\bigdata\@tall\erase.m % tall method
C:\Program Files\MATLAB\R2024a\toolbox\parallel\array\distributed\@codistributed\erase.m % codistributed method
>>
Could you confirm that the error message you got is
Unrecognized function or variable 'isTextStrict'.
Error in erase (line 33)
if ~isTextStrict(str)
?
Because C:\Program Files\MATLAB\R2024a\toolbox\matlab\strfun\erase.m only has 21 lines of code.
It does check if ~isTextStrict(str) in the code, but that check is at line 8 of the code.
isTextStrict is defined in R2024a, at toolbox/matlab/strfun/private/isTextStrict.m
which -all isTextStrict
the main error that gives me is
Error using erase
Too many input arguments.
Error in mlearnapp.internal.ui.savesession.SessionSaveLoadController (line 108)
this.MATLABRelease = erase(versionInfo.Release, {'(',')'});
Error in mlearnapp.internal.model.ModelFactory/createSessionSaveLoadController (line 431)
sessionSaveLoadController = mlearnapp.internal.ui.savesession.SessionSaveLoadController(session, dialogFactory, problemDependentToolstripFactory, fileUtilities, appConfiguration);
Error in mlearnapp.internal.model.Session (line 168)
this.SessionSaveLoadController = this.ModelFactory.createSessionSaveLoadController(this, problemDependentToolstripFactory);
Error in mlearnapp.internal.model.SessionFactory/createSession (line 18)
session = mlearnapp.internal.model.Session(sessionFactory, modelFactory, metricFactory, validationPartitionFactory, modelList, poolContext, problemDependentToolstripFactory, mainThreadBusyTracker);
Error in classificationLearner (line 100)
session = sessionFactory.createSession(metricFactory, validationPartitionFactory, problemDependentToolstripFactory, mainThreadBusyTracker);
also for the strict check it gives me this
>> which -all isTextStrict
C:\Program Files\MATLAB\R2024a\toolbox\matlab\strfun\private\isTextStrict.m % Private to strfun
>>

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by