tbpsg_matrix_vars function gets headers (names of variables) of matrices for solved optimization problem.

 

Syntax

[output] = tbpsg_matrix_vars(solution_str, outargstruc_arr)

 

Description

[output] = tbpsg_matrix_vars(solution_str, outargstruc_arr) returns the header (names of variables) of matrices extracted from the solution reports solution_str and outargstruc_arr.

 

Input Arguments

solution_str

string with solution report;

outargstruc_arr

array of output PSG data structures;

 

Output Arguments

output

cell array of headers (names of variables) of matrices.

 

Example

Spline Approximation problem is defined in section Quick Start with PSG Toolbox.

Open PSG Toolbox:

 

>> tbpsg_toolbox

 

Load in PSG Toolbox problem from file .\Aorda\PSG\MATLAB\Examples\Toolbox\problem_spline_test.mat

Open in PSG Toolbox menu "Save to Workspace" and save problem statement and toolbox structure to Workspace variables problem_statement and toolboxstruc_arr.

 

Optimize problem using tbpsg_run:

 

[solution_str,outargstruc_arr]=tbpsg_run(problem_statement, toolboxstruc_arr);

 

Extract headers (names of variables) of matrices from the solution reports solution_str and outargstruc_arr:

 

>> output = tbpsg_matrix_vars(solution_str, outargstruc_arr)

 

output =

 

   {1x15 cell}    {1x15 cell}    {1x15 cell}    {1x15 cell}

 

>> output{1}

 

ans =

 

 Columns 1 through 12

 

   'f1'    'f2'    'f3'    'f4'    'f5'    'f6'    'f7'    'f8'    'f9'    'f10'    'f11'    'f12'

 

 Columns 13 through 15

 

   'f13'    'f14'    'f15'

 

See also

tbpsg_isoptimal, tbpsg_objective, tbpsg_constraint, tbpsg_function, tbpsg_time, tbpsg_point_data, tbpsg_point_vars, tbpsg_matrix_data, tbpsg_vector_data