0001
0002
0003 [P0,Txt,Raw]=xlsread('P_matrix');
0004 [C,Txt,Raw]=xlsread('C');
0005 P = P0+C;
0006 OneVec = ones(128,1);
0007
0008
0009 Norm_Cs = [];
0010 k = 1;
0011 for s = 0:10^(-3):1
0012 Cs = P - P0 + s*(OneVec*pid' - P);
0013 Norm_Cs(k) = norm(Cs);
0014 k = k+1;
0015 end
0016
0017
0018
0019 Norm_C_Qs = [];
0020 k = 1;
0021 for s = 0:10^(-3):1
0022 C_Qs = s*(OneVec*pid' - P0);
0023 Norm_C_Qs(k) = norm(C_Qs);
0024 k = k+1;
0025 end
0026
0027
0028 figure; plot([0:10^(-3):1], Norm_Cs);
0029 hold on; ; plot([0:10^(-3):1], Norm_C_Qs, '-- r');
0030 xlabel('s'); legend ('||C(s)||','||C_Q(s)||' );
0031