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

 采纳的回答

Ah, restoredefaultpath helps.

5 个评论

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
>>

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by