function sfreq = freqstr(nfreq)
%FREQSTR returns the string representation of the numeric frequency indicator.
%
%   SFREQ = FREQSTR(SFREQ) returns the string representation of the 
%   frequency numeric indicator, NFREQ, as SFREQ.
%
%   Valid numeric indicators are:   0 -> Unknown
%                                   1 -> Daily
%                                   2 -> Weekly
%                                   3 -> Monthly
%                                   4 -> Quarterly
%                                   5 -> Semiannual
%                                   6 -> Annual
%
%   See also FREQNUM.

%   Copyright 1995-2018 The MathWorks, Inc.

warning(message('finance:ftseries:fints_fints:FunctionToBeRemoved'))
wState  = warning;                           % Save warning state
cleanUp = onCleanup(@() warning(wState));    % Restore warning state
warning('off','finance:ftseries:fints_fints:FunctionToBeRemoved')

switch nfreq
case 0
    sfreq = 'Unknown';
case 1
    sfreq = 'Daily';
case 2
    sfreq = 'Weekly';
case 3
    sfreq = 'Monthly';
case 4
    sfreq = 'Quarterly';
case 5
    sfreq = 'Semiannual';
case 6
    sfreq = 'Annual';
otherwise
    error(message('finance:ftseries:freqstr:InvalidFREQ'));
end

% [EOF]