function [bb, tim] = rcosfir(r, N_T, rate, T, fil_type, col)
%RCOSFIR Design a raised cosine FIR filter.
%
%   WARNING: RCOSFIR has been removed. Use RCOSDESIGN instead.
%
%   B = RCOSFIR(R, N_T, RATE, T) designs and returns a raised cosine FIR filter.
%   A raised cosine filter is typically used to shape and oversample a symbol
%   stream before modulation/transmission as well as after reception and
%   demodulation.  It is used to reduce the bandwidth of the oversampled symbol
%   stream without introducing inter-symbol interference.
%
%   The time response of the raised cosine filter is,
%
%     h(t) = SINC(t/T) COS(pi R t/T)/(1 - 4 R^2 t^2 /T^2)
%
%   The frequency domain has the spectrum
%
%            /  T                                 when 0 < |f| < (1-r)/2/T
%            |          pi T         1-R    T          1-R         1+R
%     H(f) = < (1 + cos(----) (|f| - ----) ---    when --- < |f| < ---
%            |            r           2T    2          2 T         2 T
%            \  0                                 when |f| > (1+r)/2/T
%
%
%   T is the input signal sampling period, in seconds.  RATE is the
%   oversampling rate for the filter (or the number of output samples per input
%   sample). The roll-off factor, R, determines the width of the transition
%   band.  R has no units.  The transition band is (1-R)/(2*T) < |f| <
%   (1+R)/(2*T).
%
%   N_T is a scalar or a vector of length 2.  If N_T is specified as a
%   scalar, then the filter length is 2 * N_T + 1 input samples.  If N_T is
%   a vector, it specifies the extent of the filter.  In this case, the filter
%   length is N_T(2) - N_T(1) + 1 input samples (or
%   (N_T(2) - N_T(1))* RATE + 1 output samples).
%
%   The default value for N_T is 3.  The default value of RATE is 5.
%   The default value of T is 1.
%
%   B = RCOSFIR(R, N_T, RATE, T, FILTER_TYPE) designs and returns a
%   square root raised cosine filter if FILTER_TYPE == 'sqrt'. The default
%   value of FILTER_TYPE, 'normal', returns a normal raised cosine filter.
%
%   RCOSFIR(R, N_T, RATE, T, FILTER_TYPE, COL) produces the time response
%   and frequency response with the curve color as specified in the string
%   variable COL. The string in COL can be any type as defined in
%   PLOT.  If COL is not present, the default color will be used in the plot
%
%   [B, Sample_Time] = RCOSFIR(...) returns the FIR filter and the output sample
%   time for the filter. Note that the filter sample time is T / RATE.
%
%   See also RCOSDESIGN, RCOSDEMO, GAUSSDESIGN.

%   Copyright 1996-2023 The MathWorks, Inc.

error(message('comm:rcosfir:willBeRemoved', 'rcosfir', 'rcosdesign'));
