ated situations (described later) the value of this field depends on the input data.
You can construct an uncertain matrix and compute the worst-case norm of the matrix, as well as its inverse. Your objective is to accurately estimate the worst-case, or the largest, value of the condition number of the matrix.
a=ureal('a',5,'Range',[4 6]); b=ureal('b',2,'Range',[1 3]); b=ureal('b',3,'Range',[2 10]); c=ureal('c',9,'Range',[8 11]); d=ureal('d',1,'Range',[0 2]); M = [a b;c d]; Mi = inv(M); [maxnormM] = wcnorm(M) maxnormM = LowerBound: 14.7199 UpperBound: 14.7327 [maxnormMi] = wcnorm(Mi) maxnormMi = LowerBound: 2.5963 UpperBound: 2.5979
The condition number of M must be less than the product of the two upper bounds for all values of the uncertain elements making up M. Conversely, the largest value of M condition number must be at least equal to the condition number of the nominal value of M. Compute these crude bounds on the worst-case value of the condition number.
condUpperBound = maxnormM.UpperBound*maxnormMi.UpperBound; condLowerBound = cond(M.NominalValue); [condLowerBound condUpperBound] ans = 5.0757 38.2743
How can you get a more accurate estimate? Recall that the condition number of an nxm matrix M can be expressed as an optimization, where a free norm-bounded matrix Δ tries to align the gains of M and M–1
If M is itself uncertain, then the worst-case condition number involves further maximization over the possible values of M. Therefore, you can compute the worst-case condition number of an uncertain matrix by using a ucomplexm uncertain element, and then by using wcnorm to carry out the maximization.
Create a 2-by-2 ucomplexm object, with nominal value equal to zero.
Delta = ucomplexm('Delta',zeros(2,2));
The range of values represented by Delta includes 2-by-2 matrices with the maximum singular value less than or equal to 1.
You can create the expression involving M, Delta and inv(M).
H = M*Delta*Mi;
Finally, consider the stopping criteria and call wcnorm. One stopping criteria for wcnorm(H) is based on the norm of the nominal value of H. During the computation, if wcnorm determines that the worst-case norm is at least
then the calculation is terminated. In our case, since H.NominalValue equals 0, the stopping criteria is governed by ABadThreshold. The default value of ABadThreshold is 5. To keep wcnorm from prematurely stopping, set ABadThreshold to 38 (based on our crude upper bound above).
opt = wcgopt('ABadThreshold',38); [maxKappa,wcu,info] = wcnorm(H,opt); maxKappa maxKappa = LowerBound: 26.9629 UpperBound: 27.9926
You can verify that wcu makes the condition number as large as maxKappa.LowerBound.
cond(usubs(M,wcu)) ans = 26.9629