Fold a Column

This function creates a matrix from a single column of data. Rectangular, distance, angle, binary, and three-dimensional data matrices may be created in this manner. The new matrix is created by filling in the columns row by row. For three-dimensional data matrices, the values are filled in for each x for each y for each z. Only two-dimensional angle matrices may be created by folding a column. To create a three-dimensional angle matrix, fold the two columns representing theta and phi independently, then use the merge angle matrices procedure to combine the folded angle matrices into a single three-dimensional angle matrix.

 

 

 

Data Column

 

 

 

 

 

1

 

 

 

 

 

2

 

 

Col 1

Col 2

Col 3

3

Row 1

1

2

3

4

 

Row 2

4

5

6

5

 

 

 

 

 

6

 

 

 

 

 

Folding a column into a 3 column × 2 row rectangular matrix. The numbers in the cells refer to the row of the original data column (left).

 

 

Data Column

 

 

 

 

 

1

 

 

 

 

 

2

 

 

 

X1

X2

3

 

Z1

Y1

1

2

4

 

Y2

3

4

5

 

Z2

Y1

5

6

6

 

 

Y2

7

8

7

 

 

 

 

 

8

 

 

 

 

 

Folding a column into a 2 × 2 × 2 three-dimensional data matrix. The numbers in the cells refer to the row of the original data column (left).

 

 

You must choose the data matrix and column you wish to fold, the type of matrix to create, and the size of the desired matrix (the exact size choices depend on the type of matrix chosen). When creating distance and angle matrices, you may choose to fold either the full matrix or just the upper or lower triangles, with or without the diagonal.

 

FoldWindow.png

Fold Column window.

 

If the desired output matrix would contain more entries than contained in the chosen column, you will be prompted whether to fill the remainder of the output matrix with empty values. If the desired output matrix would contain fewer entries than contained in the chosen column, you will be prompted whether to truncate the remainder of the column. (When using the FOLD batch command, no prompt is given and the resultant matrix is automatically created using as much or as little data as necessary to create an output matrix of the desired size). This procedure can be reversed by unfolding a matrix.