|
59 | 59 |
|
60 | 60 | xk=sdpvar(2,1);
|
61 | 61 |
|
62 |
| -B{2,1}=[0.445;1]; |
| 62 | +B{2,1}=input('Enter value for B{2,1} (default =[0;1]) => '); |
| 63 | +if isempty(B{2,1}) |
| 64 | + B{2,1}=[0;1]; |
| 65 | +end |
63 | 66 |
|
64 | 67 | %% LMI 11
|
65 | 68 |
|
|
109 | 112 |
|
110 | 113 | %% Plot
|
111 | 114 |
|
| 115 | +npoints=100; |
| 116 | + |
112 | 117 | tfig=0;
|
113 | 118 | tfig=tfig+1;
|
114 | 119 | figure(tfig);
|
115 |
| -plot(LMIs_jianbo,xk,'b',[],opts); |
| 120 | +p=plot(LMIs_jianbo,xk,'b',npoints,opts); |
| 121 | +p=cell2mat(p)'; |
| 122 | +fill(p(:,1),p(:,2),'blue','LineWidth',2,'FaceAlpha',.3); |
116 | 123 | if flagc == 1
|
117 | 124 | title(sprintf('Feasible Region - Input constraint with u_{max} = %g',umax));
|
118 | 125 | else
|
|
123 | 130 | % Doing it again just to save the points
|
124 | 131 |
|
125 | 132 | if flagc == 1
|
126 |
| - s=sprintf('points_feasreg_jianbo_u_constraint_N_%d_umax_%s=plot(LMIs_jianbo,xk,''b'',[],opts);',N,strrep(num2str(umax),'.','_')); |
| 133 | + s=sprintf('points_feasreg_jianbo_u_constraint_N_%d_umax_%s=p;',N,strrep(num2str(umax),'.','_')); |
127 | 134 | elseif flagc == 2
|
128 |
| - s=sprintf('points_feasreg_jianbo_u_and_x_constraints_N_%d_umax_%s_xmax_%s=plot(LMIs_jianbo,xk,''b'',[],opts);',N,strrep(num2str(umax),'.','_'),strrep(num2str(xmax),'.','_')); |
| 135 | + s=sprintf('points_feasreg_jianbo_u_and_x_constraints_N_%d_umax_%s_xmax_%s=p;',N,strrep(num2str(umax),'.','_'),strrep(num2str(xmax),'.','_')); |
129 | 136 | else
|
130 |
| - s=sprintf('points_feasreg_jianbo_no_constraints_N_%d=plot(LMIs_jianbo,xk,''b'',[],opts);',N); |
| 137 | + s=sprintf('points_feasreg_jianbo_no_constraints_N_%d=p;',N); |
131 | 138 | end
|
132 | 139 |
|
133 |
| -disp('Doing it again just to save the feasible region'); |
134 |
| - |
135 | 140 | eval(s);
|
136 | 141 |
|
137 | 142 | if exist('data','dir') ~= 7 % Please see help for exist
|
|
0 commit comments