function  LTmin = minth(LTg, Map)
%LTmin = Minimum_masking_threshold(LTg, Map)
%
%   Find the minimum of the global masking threshold for each subband.
%   [1, pp. 114]
%
%   See also Global_masking_threshold
   
%   Author: Fabien A.P. Petitcolas
%           Computer Laboratory
%           University of Cambridge
%   Copyright (c) 1998 by Fabien A.P. Petitcolas
%   $Id: Minimum_masking_threshold.m,v 1.2 1998-06-22 17:47:56+01 fapp2 Exp $

%-------------------------------------------------------------------------------
common;

Subband_size = FFT_SIZE / 2 / N_SUBBAND;

for n = 1:N_SUBBAND, % For each subband
   
   LTmin(n) = LTg(Map((n - 1) * Subband_size + 1));
   
   for j = 2:Subband_size, % Try all the samples in this subband
      if (LTg(Map((n - 1) * Subband_size + j)) < LTmin(n))
         LTmin(n) = LTg(Map((n - 1) * Subband_size + j));
      end
   end
end
