%======================================================================= %To solve optimization problem: %Create a new subfolder in ...\PSG\MATLAB: %..\PSG\MATLAB\problem_two_tailed_var90 %Download and unpack the following zipped file from 'Data' to the created folder: %'Mat_data_problem_two_tailed_var90.zip' %Run program 'problem_two_tailed_var90.m' %======================================================================= clc; clear; addpath('..'); %Load data: load('.\problem_two_tailed_var90_data.mat') %Define input arguments: risk={1,'var_risk_g',1,'var_risk'}; w={0.9,0.9}; H={H1,H2}; c={c1,c2}; %Solve optimization problems: [xout, fval, status, output] = riskprog(risk, w, H, c); %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('var_risk_g = %g', output.frval(1))); disp(sprintf('var_risk = %g', output.frval(2))); %Display optimal point: disp('optimal point = '); disp(xout);