%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% FILE: example_ee.m
%%
%% Eugene Equally-Brisk's solution with dmatrix.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Decision matrix
R = [ 1   1   0   0;
      0   0   1   0;
      0   1   0   1];
%% Probabilities for scenarios.
p = [0.05  0.45  0.25  0.25]';

%% Decision matrix and its solution
dp.dmat = R;
dp.drule = "ev";
dp.prob = p;
dr = dmatrix(dp)

%% Running the file we get the output dr
%% >> example_ee
%% dr =
%%
%%  scalar structure containing the fields:
%%
%%    dvalues =
%%
%%       0.5000
%%       0.2500
%%       0.7000
%%
%%    doptim = 3
