PSG Vector in MATLAB is a numerical array with two columns: id, value. This object is commonly used for specifying vector constraints, some special PSG functions.

 

Description

Creation

Technical description

Example

 

Description

PSG Vector in Toolbox consists of:

 

name

name of vector;

data

values of data (real or integer);

 

Remarks

Name of  vector should not exceed 128 symbols, it is not case sensitive and includes only alphabetic characters, numbers, and  underscore sign, “_”.

 

Creation

 

There are two ways for creation of PSG Parameter in MATLAB:

use PSG Vector in Toolbox GUI;
use tbpsg_vector_pack for packing data to structure.

 

Technical description

 

PSG Matrix in MATLAB is a set of nested structures:

 

First level is a structure with three fields:

 

type

string with type of PSG object: 'matrix', 'pmatrix', 'point', 'vector', 'parameter';

data

structure with numeric and string values of vector;

string

structure with names of MATLAB variables that corresponds to numeric values of vector;

 

Second level are two structures with the fields:

 

1. Data structure:

name

string with name of vector;

data

values of data (real or integer);

 

2. String structure:

name

MATLAB variable for string with name of vector;

data

MATLAB variable for values of vector;

 

Note. Create or modify described above structures is NOT recommended.

 

Example

 

Pack vector [0.1 1] to structure "toolboxstruc_arr":

toolboxstruc_arr = tbpsg_vector_pack('vector_example', [0.1 1]);

 

Output:

>> toolboxstruc_arr

ans =

     type: 'vector'

     data: [1x1 struct]

   string: [1x1 struct]

 

>> toolboxstruc_arr.data

ans =

   name: 'example'

   data: [0.100000000000000 1]

 

>> toolboxstruc_arr.string

ans =

   name: 'example'

   data: 'vector_example_data'

 

Remarks

variable vector_example_data was created automatically by function tbpsg_vector_pack.

 

See also

PSG Vector in Toolbox, PSG Vector in General (Text) Format