function m = mltplcty( p, ind, tol)
%MLTPLCTY  Multiplicity of a pole
%	MLTPLCTY(P,IND,TOL) finds the multiplicity of P(IND) in the vector P
%	with a tolerance of TOL.  TOL defaults to .001.
%
%	Uses MPOLES in the Signal Processing Toolbox.
%
%	Used by IMPZ.

%	Author(s): T. Krauss, 7-27-93
%	Copyright (c) 1984-94 by The MathWorks, Inc.
%       $Revision: 1.3 $  $Date: 1994/01/25 17:59:29 $

    if nargin<3
        tol = .001;
    end

    [mults,indx]=mpoles(p,tol);

    m = mults(indx(ind));
    for i=indx(ind)+1:length(mults)
        if mults(i)>m
            m = m + 1;
        else
            break;
        end
    end

