function An = normatom(A)
%NORMALIZE   Normalizes an atom
%   AN = NORMALIZE(A) returns an uncertain matrix which depends on the
%   atom, A. AN is normalized in its dependence on A, i.e. as A sweeps
%   through its range of values and if:
%     A is a ureal, then AN takes on values in [-1,1].
%     A is a ucomplex, then AN takes on values in the unit disk.
%     A is a ultidyn, then AN sweeps out systems norm-bounded by 1.
%     A is a ucomplexm, then AN sweeps out matrices norm-bounded by 1.
%
%   % EXAMPLE 1: (CUT/PASTE)
%   %  if A is ureal, then AN is normalized to [-1 1]
%   a = ureal('a',5,'Range',[4 8]);
%   an = normalize(a);
%   ansamp=usample(an,100); 
%   [min(ansamp(:)) max(ansamp(:))]
%    
%   % EXAMPLE 2: (CUT/PASTE)
%   %  if A is ucomplex, then AN is normalized to the unit disk. 
%   a = ucomplex('a',4+j,'Radius',2.5);
%   an = normalize(a);
%   ansamp=usample(an,200); 
%   plot(real(ansamp(:)),imag(ansamp(:)),'bx');
%   hold on;
%   x=linspace(-1,1);
%   plot(x,sqrt(1-x.^2),'r',x,-sqrt(1-x.^2),'r')
% 
%   % EXAMPLE 3: (CUT/PASTE)
%   %  if A is ultidyn, then AN sweeps out systems norm-bounded by 1. 
%   a = ultidyn('a',[3 4],'GainBounded',3);
%   an = normalize(a);
%   wcnorm(an)      
%
%   See also LFT

% Copyright 2003-2004 The MathWorks, Inc.

if isa(A,'atom')
   N = pvget(A,'Normalizer');
   An = lft(A,N.T);
else
   msg = 'A must be an ATOM.';
   error(msg);
end
