function h = cmif(G,nlines)
%
%   CMIF
%
%   h = cmif(G,nlines)
%
%   Computes the Complex Mode Indicator Function (CMIF)
%   for the FRF matrix 'G' which contains 'nlines' frequency 
%   bins
%
%   G is in the format output by 'mdf2mat' 
%
%   h is a matrix of #sv's by #freq lines

%  Version SWD970710
%
%  Copyright (c) 1996 by Scott W. Doebling
%	Los Alamos National Laboratory
%	ESA-EA, doebling@lanl.gov
%

G = G(:,:,1);  % This is a stopgap in the event of Bootstrap-compatible data

nresp = size(G,1)/nlines;
nref = size(G,2);

h = zeros(nref,nlines);

for i = 1:nlines,

   h(:,i) = svd(abs(G(i:nlines:(nresp*nlines),:)));

end

return
