www.gusucode.com > robust 案例源码程序 matlab代码 > robust/UncertainComplexMatrixAndWeightingMatricesExample.m
%% Uncertain Complex Matrix and Weighting Matrices % Create a 4-by-3 uncertain complex matrix (|ucomplexm|), and view its % properties. The simplest construction requires only a name and nominal value. %% m = ucomplexm('m',[1 2 3; 4 5 6; 7 8 9; 10 11 12]) %% get(m) %% % The nominal value is the matrix you supply to |ucomplexm|. mnom = m.NominalValue %% % By default, the weighting matrices are the identity. For example, % examine the left weighting. m.WL %% % Sample the uncertain matrix, and compare to the nominal value. Note the % element-by-element sizes of the difference are roughly equal, % indicative of the identity weighting matrices. msamp = usample(m); diff = abs(msamp-mnom) %% % Change the left and right weighting matrices, making the uncertainty % larger as you move down the rows, and across the columns. m.WL = diag([0.2 0.4 0.8 1.6]); m.WR = diag([0.1 1 4]); %% % Sample the uncertain matrix again, and compare to the nominal value. Note % the element-by-element sizes of the difference, and the general trend % that the smallest differences are near the (1,1) element, and the largest % differences are near the (4,3) element, consistent with the trend in the % diagonal weighting matrices. msamp = usample(m); diff = abs(msamp-mnom)