function saveCompactModel(compactObj,filename) %#ok<INUSD>
%SAVECOMPACTMODEL Saves a compact model into a file used for code
%   generation. The compact model can be one of: classification model, 
%   regression model and nearest neighbor searcher.
%   
%   SAVECOMPACTMODEL has been removed. Use <a href="matlab:doc saveLearnerForCoder">saveLearnerForCoder</a> instead.
%
%   SAVECOMPACTMODEL(COMPACTOBJ,FILENAME) saves a compact model as a struct
%   in a MAT-file, FILENAME. FILENAME must be a character vector. The compact 
%   model can be one of: classification model, regression model and nearest 
%   neighbor searcher. This MAT-file can be passed to loadCompactModel for code
%   generation. Use the MAT-file, FILENAME to load and construct a compact 
%   model at compile-time.
%
%   See also LOADCOMPACTMODEL, SAVELEARNERFORCODER, LOADLEARNERFORCODER

%   Copyright 2016-2021 The MathWorks, Inc.

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



