%======================================================================= %To solve optimization problem: %Create a new subfolder in ...\PSG\MATLAB: %..\PSG\MATLAB\problem_find_lambda %Download and unpack the following zipped file from 'Data' to the created folder: %'Mat_data_problem_find_lambda.zip' %Run program 'problem_find_lambda.m' %======================================================================= clc; clear; addpath('..'); %Load data: load('.\problem_find_lambda_data.mat') %Define options for PSG solver: stroptions.Solver = 'CAR'; stroptions.Precision = 9; %Solve optimization problems: [xout, fval, status, output] = riskprog('meanabs_pen', [], H, [], [], [], [], [], Aeq, beq, lb, ub, [], stroptions); %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 function: disp(sprintf('meanabs_pen = %g', output.frval)); %Display left hand sides of linear equality: disp('linear equality: '); disp(output.fAeqval'); %Display residual of linear equality: disp(sprintf('residual of linear equality = %g', output.rAeqval)); %Display optimal point: disp('optimal point = '); disp(xout);