Home > brede > brede_mat_permute.m

brede_mat_permute

PURPOSE ^

brede_mat_permute - Permute rows of matrix

SYNOPSIS ^

function [Mout, I] = brede_mat_permute(Min, varargin)

DESCRIPTION ^

 brede_mat_permute    - Permute rows of matrix

       Mout = brede_mat_permute(Min)
       [Mout,I] = brede_mat_permute(Min)

       Input:  Min   'Mat' structure

       Output: Mout  'Mat' structure
               I     Permutation indices

       Randomly permute the rows of a matrix

       Example: 
         M = rand(10,5);
         [M1,I] = brede_mat_permute(M);
         M2 = brede_mat_submatrix(M, 'rows', I);
         all(M1.matrix(:) == M2.matrix(:))

       See also BREDE, BREDE_MAT.

 $Id: brede_mat_permute.m,v 1.6 2008/03/12 14:56:36 fn Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005