How to Add Statistics and Machine Learning Toolbox in MATLAB?

Illustration
support - 2026-07-24T11:32:25+05:30
Question: How to Add Statistics and Machine Learning Toolbox in MATLAB?

I get Undefined function or variable 'fitcknn' or missing toolbox error in MATLAB. How do I install Statistics and Machine Learning Toolbox?

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2026-07-24

To install Statistics and Machine Learning Toolbox:

  1. Open MATLAB. In the Home tab, click Add-Ons > Get Add-Ons.
  2. In the Add-On Explorer search bar, type Statistics and Machine Learning Toolbox.
  3. Click on the toolbox card and click Install or Add.
  4. Verify installation in MATLAB Command Window by executing:
    license('test', 'statistics_toolbox') % Returns 1 if installed
    ver % Displays all installed toolboxes
    


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!