Eigen: Extract eigenvector...

Extract a specified eigenvector from the Eigen as a Matrix.

Settings

Eigenvector number
determines the eigenvector.
Number of rows
determines the number of rows of the newly created Matrix. If left 0, the number of rows is determined from the dimension, i.e. the number of elements, of the eigenvector and the numberOfColumns argument as the dimension / numberOfColumns, rounded to the next larger integer.
Number of columns
determines the number of columns of the newly created Matrix. If left 0, the number of columns is determined by from the dimension, i.e. the number of elements, of the eigenvector and the numberOfRows argument as dimension / numberOfRows, rounded to the next larger integer. If both Number of rows and Number of columns are zero, a Matrix with only one row and dimension columns will be created.

Examples

Suppose we have an eigenvector of dimension 3 with elements {0.705, 0.424, 0.566}, then the newly created Matrix will depend on the Number of rows and Number of columns argument as follows:

If numberOfRows=0 and numberOfColumns=0, then the Matrix will have 1 row and 3 columns:

    0.705 0.424 0.566

If numberOfRows=3 and numberOfColumns=0, then the Matrix will have 3 rows and 1 column:

    0.705
    0.424
    0.566

If numberOfRows=2 and numberOfColumns=2, then the Matrix will have 2 rows and 2 columns:

    0.705 0.424
    0.566 0.0

If numberOfRows=4 and numberOfColumns=3, then the we get:

    0.705 0.424 0.566
    0.0 0.0 0.0
    0.0 0.0 0.0
    0.0 0.0 0.0

© djmw 20160617