%======================================================================= %To solve optimization problem: %Create a new subfolder in ...\PSG\MATLAB: %..\PSG\MATLAB\problem_pm_mixed_percentile_regression %Download and unpack the following zipped file from 'Data' to the created folder: %'Mat_data_problem_pm_mixed_percentile_regression.zip' %Run program 'problem_pm_mixed_percentile_regression.m' %======================================================================= clc; clear; addpath('..'); %Load data: load('.\problem_pm_mixed_percentile_regression_data.mat') %Define input arguments: string = {2.875,'pm_pen',0.25,'pm_pen_g',3.9167,'pm_pen',0.25,'pm_pen_g',6,'pm_pen',0.25,'pm_pen_g',12.25,'pm_pen',0.25,'pm_pen_g'}; w = {0,0,0,0,0,0,0,0}; %Solve optimization problems: [xout, fval, status, output] = riskprog(string, w, H, c, [], [], [], [], Aeq, beq); %Display results: disp(' '); disp('Results: '); %Display status of optimization problem: disp(sprintf('status of optimization problem = %s', status)); %Display solving time: disp(sprintf('solving time = %g', output.solving_time)); %Display objective: disp(sprintf('objective = %g', fval)); %Display functions: disp(sprintf('pm_pen= %g', output.frval(1))); disp(sprintf('pm_pen_g= %g', output.frval(2))); disp(sprintf('pm_pen= %g', output.frval(3))); disp(sprintf('pm_pen_g= %g', output.frval(4))); disp(sprintf('pm_pen= %g', output.frval(5))); disp(sprintf('pm_pen_g= %g', output.frval(6))); disp(sprintf('pm_pen= %g', output.frval(7))); disp(sprintf('pm_pen_g= %g', output.frval(8))); %Display left hand sides of linear equality: disp(sprintf('linear equality = %g', output.fAeqval)); %Display residual of linear equality: disp(sprintf('residual of linear equality = %g', output.rAeqval)); %Display optimal point: disp('optimal point = '); disp(xout');