classdef (CaseInsensitiveProperties = true, TruncatedProperties = true) ModalSplit < ltioptions.Generic
    % Options set for modal splits (stabsep, freqsep).
    
    % Copyright 2023 The MathWorks, Inc.
    
    properties
        % Accuracy loss factor (default = 10).
        %
        % The modal decomposition G = G1 + G2 proceeds only when
        %     | G - (G1+G2) | < SepTol * DG
        % where DG is the absolute accuracy of the computed value of G(s). 
        % By increasing SepTol, you can force separation at the expense of 
        % a larger error.
        SepTol = 10;
    end
    
    properties (Hidden)
       % Obsoleted in R2021a
       AbsTol = 0;
       RelTol = 1e-8;
    end

    methods
        
        function this = set.SepTol(this,value)
           % SET method for SepTol option
           if ~(isnumeric(value) && isscalar(value) && isreal(value) && value>=1 && value<Inf)
              error(message('Control:transformation:stabsep7'))
           end
           this.SepTol = double(value);
        end
                        
    end
    
end