<< indexed_names indexed_names ConcatIndexesRange >>

indexed_names >> indexed_names > ConcatIndexes

ConcatIndexes

Index matrix concatenation

Syntax

indexMatrix = ConcatIndexes(indexMatrix1,indexMatrix2[,grid])
indexMatrix = ConcatIndexes(listIndexMatrix[,grid])

Arguments

indexMatrix1 and indexMatrix2

Concatenated index matrices

listIndexMatrix

List of concatenable index matrices

grid

Index matrix concatenation type. Represents an array of boolean values. The number of array elements is one less than the number of concatenated index matrices

Results

indexMatrix

Matrix of concatenated indices

Description

Concatenates index matrices according to concatenation types.

Each i-th element of the array grig determines the type of concatenation of the i-th and i+1-th matrices. If grid(i) takes the value %t, then the i-th and i+1-th matrices are concatenated by replicating the rows of these matrices, otherwise no row replication is performed. In case grid(i) is false, the numbers of rows of the i-th and i+1-th matrices must be equal.

By default, all grig values are true

Examples

//Concatenable matrices
indexMatrix1 = [ 1,  2;..
                 5,  7;..
                10, 15];
indexMatrix2 = [3;..
                6;..
                9];
grid = %f;

//Performing a concatenation
indexMatrix = ConcatIndexes(indexMatrix1,indexMatrix2,grid);

//Concatenated matrix
disp(indexMatrix);
//Concatenable matrices
indexMatrix1 = [ 1,  2;..
                10, 15];
indexMatrix2 = [3;..
                6;..
                9];
grid = %t;

//Performing a concatenation
indexMatrix = ConcatIndexes(indexMatrix1,indexMatrix2,grid);

//Concatenated matrix
disp(indexMatrix);

//Performing a concatenation
indexMatrix = ConcatIndexes(indexMatrix1,indexMatrix2);

//Concatenated matrix
disp(indexMatrix);
//Concatenable matrices
indexMatrix1 = [ 1,  2;..
                 5,  7;..
                10, 15];
indexMatrix2 = [3;..
                6;..
                9];
indexMatrix3 = [13, 17;..
                12, 16];

//Performing a concatenation
indexMatrix = ConcatIndexes(list(indexMatrix1,indexMatrix2,indexMatrix3),[%f,%t]);;

//Concatenated matrix
disp(indexMatrix);

//Performing a concatenation
indexMatrix = ConcatIndexes(list(indexMatrix1,'',indexMatrix2,indexMatrix3),[%f,%f,%t]);

//Concatenated matrix
disp(indexMatrix);

See also


Report an issue
<< indexed_names indexed_names ConcatIndexesRange >>