Can't open example openExample('stats/TrainARegressionEnsembleExample')
Show older comments
Hi Matlab buddies,
I can't open example openExample('stats/TrainARegressionEnsembleExample') in my Matlab R2018B. Do you know what the problem could be? The version? I get the following wrong message:
Error using exampleUtils.getExamplesDir (line 13)
Unable to create a working directory at the location returned by the userpath function.
Error in exampleUtils.getWorkDir (line 2)
ed = exampleUtils.getExamplesDir();
Error in setupExample (line 11)
workDir = exampleUtils.getWorkDir(metadata);
Error in openExample (line 29)
workDir = setupExample(id, workDir);
Answers (1)
Fangjun Jiang
on 6 Sep 2019
0 votes
You need to have the "Statistics and Machine Learning Toolbox".
Run "ver stats" to check
4 Comments
Vlatko Milic
on 6 Sep 2019
Fangjun Jiang
on 6 Sep 2019
Make sure you run the command in a folder that you have write access and can create a subfolder. The command creates a folder \Examples at your current folder.
Vlatko Milic
on 6 Sep 2019
Fangjun Jiang
on 6 Sep 2019
edit exampleUtils.getExamplesDir
Add a breakpoint at line 13, check the condition to figure out which caused the error.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!