1function c = cond1est (A)
2%COND1EST 1-norm condition estimate.
3% Example:
4%   c = cond1est(A)
5% See also: cs_demo
6
7% Copyright 2006-2012, Timothy A. Davis, http://www.suitesparse.com
8
9[m n] = size (A) ;
10if (m ~= n | ~isreal (A))                                                   %#ok
11    error ('A must be square and real') ;
12end
13if isempty(A)
14    c = 0 ;
15    return ;
16end
17[L,U,P,Q] = lu (A) ;
18if (~isempty (find (abs (diag (U)) == 0)))                                  %#ok
19    c = Inf ;
20else
21    c = norm (A,1) * norm1est (L,U,P,Q) ;
22end
23