%% Linear Inequalities for Asset Group Minimum and Maximum Allocation
% Use the following assets and groupings.
%
%
% Set the minimum and maximum investment in various groups.

%          INTC  XOM  RD       
Groups = [   1    1   0  ;  % North America
             0    0   1  ;  % Europe
             1    0   0  ;  % Technology
             0    1   1  ]; % Energy

GroupMin = [0.30
            0.10
            0.20
            0.50];

GroupMax = [0.75
            0.55
            0.50
            0.50];

[A,b] = pcglims(Groups, GroupMin, GroupMax)

% Portfolio weights of 50% in INTC, 25% in XOM, and 25% in RD satisfy the constraints.
% Copyright 2020 The MathWorks, Inc.