
% Computes the minimized condition number using the upper mu-bound
% S.Skogestad, 14May95

function gmin = condmin(Gf)

[dum1,n,m,dum2]=minfo(Gf);
zero = 0*eye(n);
H = abv( sbs(zero, minv(Gf)), sbs(Gf, zero));

blk0=[1 1]; blk1=blk0;
for k=2:n
  blk1 = [blk1; blk0];
end
blk2=blk1; blk=[blk1; blk2];

mu1=mu(H,blk,'Uc'); gmin1=sel(mu1,':',1); 
gmin=mmult(gmin1,gmin1); 

% Remark: The upper mu-bound with the present software is not always
% reliable. Andy Packard has a better bound for the case when all blocks
% are 1x1 complex:     [d,sclmat,gmin1] = sbscl(H,1.e-3)


