%
% Macro to test euminx.m
% (c) Marc Bodson, June 18, 2020.
%
format('compact');
fprintf('Controls effectiveness matrix: \n');
cb=[-4.4020   -4.4020    0.0090    0.0014;
    3.7246   -3.7246  -31.9219    6.0107;
    0.4988   -0.4988   -2.9234   -2.8380]
fprintf('\nVector of minimum control values: \n');
umin=[-25;-25;-21.5;-30]
fprintf('\nVector of maximum control values: \n');
umax=[25;25;21.5;30]
fprintf('\nVector of preferred control values:\n');
upref=[0;0;0;0]
%
fprintf('\nCase 1 - Feasible desired acceleration vector: \n');
ad=[100;0;0]
euminxs;
fprintf('\nComputed control vector: \n');
u
fprintf('\nAchieved acceleration vector: \n');
a
%
fprintf('\nCase 2 - Infeasible desired acceleration vector: \n');
ad=[0;500;-80]
euminxs;
fprintf('\nComputed control vector: \n');
u
fprintf('\nAchieved acceleration vector: \n');
a