MATLAB: Can’t I load the MATLAB example files carbig.mat or cereal.mat

carbig.matcereal.matloadStatistics and Machine Learning Toolbox

Why do I receive an error when attempting to load the MATLAB example files "carbig.mat" or "cereal.mat"?
>> load carbig.mat
Error using load
Unable to read file 'carbig.mat'. No such file or directory.
>> load cereal.mat
Error using load
Unable to read file 'cereal.mat'. No such file or directory.

Best Answer

These sample data sets are only included with the Statistics and Machine Learning Toolbox and will not be installed with a basic installation of MATLAB.
You can install the Statistics and Machine Learning Toolbox by using the Add-On Explorer in MATLAB, as follows:
1) Open MATLAB and click on the Add-Ons icon under the Home tab to open the Add-On Explorer
2) Search for "*Statistics and Machine Learning Toolbox"* using the search field displayed in the top-right of the Add-On Explorer
3) Click on the link for the first result returned (the link should be labeled "Statistics and Machine Learning Toolbox") to open its detailed information page
4) On the detailed information page, click the *Install *button
After installing the Statistics and Machine Learning Toolbox you should be able to load the "carbig.mat" and "cereal.mat" MATLAB example files.