@permute |

Permutation of matrix.

Syntax: @permute(m)

m: matrix, vector

Return: matrix, vector

Returns a matrix or vector whose rows are randomly drawn without replacement from rows of the input m. The output has the same size as the input matrix or vector.

To draw with replacement from rows of a matrix, use
@resample.

Examples

matrix xp = @permute(x)

Cross-references