function compactObj = loadCompactModel(filename) %#ok<STOUT,INUSD> %#codegen
%LOADCOMPACTMODEL Constructs a compact model from a structure saved in
%   a file created using saveCompactModel. The compact model can be one of:
%   classification model, regression model and nearest neighbor searcher.
%
%   LOADCOMPACTMODEL has been removed. Use <a href="matlab:doc loadLearnerForCoder">loadLearnerForCoder</a> instead.
%
%   COMPACTOBJ = LOADCOMPACTMODEL(FILENAME) constructs a compact model from the
%   struct stored in the MAT-file, FILENAME.  The compact model can be one of:
%   classification model, regression model and nearest neighbor searcher. FILENAME
%   must be a character vector. The MAT-file FILENAME must be created using
%   saveCompactModel. The MAT-file FILENAME is used during code generation to
%   construct a compact  model at compile-time.
%
%   See also SAVECOMPACTMODEL, SAVELEARNERFORCODER, LOADLEARNERFORCODER

%   Copyright 2016-2021 The MathWorks, Inc.

error(message('stats:classreg:loadCompactModel:FunctionToBeRemoved','loadCompactModel','loadLearnerForCoder'));