tbpsg_function_value function calculates PSG function (see PSG Function) value on PSG point.

 

Syntax

[val] = tbpsg_function_value(func_descr, point_name, toolboxstruc_arr)

 

Description

[val] = tbpsg_function_value(func_descr, point_name, toolboxstruc_arr) returns value for a scalar PSG function defined by func_descr and vector for linearmulti function on PSG point point_name with data packed in the structure toolboxstruc_arr (see PSG Data Objects in MATLAB)

 

 

Input Arguments

func_descr

string with description of PSG function (see PSG Function);

point_name

name of PSG point (see PSG Point in MATLAB);

toolboxstruc_arr

array of PSG data structures (see PSG Data Objects in MATLAB).

 

Output Arguments

val

value (real) of PSG function in the given point.

 

Remarks

toolboxstruc_arr should contains all matrices from func_descr as well as point named point_name.

 

Example

Input data:

H1 = [1 4 8 3;7 -5 4 -6;-2 8 -1 0;0 -3 -4 9];

c1 = [-2;11;6;10];

p1 = [0.2;0.2;0.3;0.3];

a = [1;1;1;1];

alpha = 0.65;

To pack matrix, point and parameter to array of structures "toolboxstruc_arr":

toolboxstruc_arr(1) = tbpsg_matrix_pack('matrix_1', H1, [],  c1, p1);

toolboxstruc_arr(2) = tbpsg_point_pack('point_1', a, []);

toolboxstruc_arr(3) = tbpsg_parameter_pack('parameter_alpha', alpha);

Calculate cvar_risk function with parameter 0.65 at point 'point_1':

val = tbpsg_function_value('cvar_risk(parameter_alpha,matrix_1)','point_1',toolboxstruc_arr);

Display function value:

disp(sprintf('tbpsg_function_value = %g', val2));

Output:

tbpsg_function_value = 9.71429

 

See also

Table (List) of Functions

tbpsg_function_sensitivity, tbpsg_function_increment,tbpsg_loss_values