No BSD License  

Highlights from
Permute a grouped vector

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 1.38 KB File ID: #14415
image thumbnail

Permute a grouped vector

by Dimitri Shvorob

 

25 Mar 2007 (Updated 26 Mar 2007)

(Extension of RANDPERM)

| Watch this File

File Information
Description

Function RANDPERG extends Matlab's RANDPERM by considering permutations of a grouped vector: if x is an n*1 data vector, and c is an n*1 vector of group assignments - so that x(i) belongs to group c(i) - randperg(x,c) returns an n*1 vector y where each c group retains the indexes it had in x [permutation is thus 'partial'], but its individual elements are randomly rearranged. See the function's help header for details.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
PARTPERM -- Partial random permutation of a vector, SHAKE

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrices Dimitri Shvorob 22 Oct 2008 09:05:59
permute rearrange group block Dimitri Shvorob 22 Oct 2008 09:05:59

Contact us at files@mathworks.com