tbpsg_matrix_data function gets data of matrices for solved optimization problem.

 

Syntax

[output] = tbpsg_matrix_data(solution_str, outargstruc_arr)

 

Description

[output] = tbpsg_matrix_data(solution_str, outargstruc_arr) returns the cell array of data 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 data from 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 matrix data from the solution reports solution_str and outargstruc_arr:

 

>> output = tbpsg_matrix_data(solution_str, outargstruc_arr)

 

output =

 

   [4x15 double]    [5x15 double]    [4x15 double]    [5x15 double]

 

>> output{1}

 

ans =

 

 Columns 1 through 10

 

  -1.2709   -1.2769   -0.9310   -0.9635   -1.1008   -1.3382   -1.0997   -0.5614   -0.5940   -0.7287

  -0.1438   -0.2865   -0.7705   -0.8185   -0.8634   -0.3385   -0.8819   -0.5614   -0.5940   -0.7287

   0.4529    0.5239   -0.2833   -0.2345   -0.2703    0.6613   -0.2828   -0.5614   -0.5940   -0.4142

   1.3479    1.3043    0.8650    0.9029    0.9876    0.6613    1.1331   -0.5614   -0.5940    1.7872

 

 Columns 11 through 15

 

  -0.4218   -1.1928   -1.3327   -1.0518   -1.5861

   0.1967   -0.7129   -0.7441   -0.4083   -0.3103

   0.6914   -0.0585    0.2251   -0.3967    0.5403

   1.0625    1.1195    0.8067    0.1207    1.3058

 

 

See also

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