Random Element
by Skynet
28 Dec 2004
(Updated 25 Apr 2005)
Returns elements randomly selected from any matrix.
|
Watch this File
|
| File Information |
| Description |
RANDELEMENT(ARRAY,N) returns a row of N elements, selected at random (and with replacement) from ARRAY.
[There probably is some toolbox function that does something very similar.]
EXAMPLES:
randelement([0:9],5)
may return [4 8 8 5 2]
randelement({'a' 'b' 'c' 'd' 'e' 'f'},2)
may return {'f' 'd'} |
| 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.
|
| Comments and Ratings (4) |
| 12 Aug 2005 |
Sameer Aidoor
|
|
|
| 31 Oct 2006 |
abhay krishna
|
|
|
| 11 Feb 2009 |
Adam Chapman
|
|
|
| 13 Jan 2011 |
Jennifer
|
|
|
| Updates |
| 20 Apr 2005 |
Fixed error in Description and Comments. |
| 25 Apr 2005 |
Made minor update to description and comments. |
|
Contact us at files@mathworks.com