Possible Duplicate:
randperm subset of random m-by-n matrix
When trying to randomly select 1000 rows from a dataset “fulldata” I get an error, im not very sure how its done in matlab but this is what I tryed:
data = datasample(fulldata,6,1000)
The fulldata is 490256×6 and I want to select 1000 random rows from this data. In matlab its throwing the error
??? Undefined function or method 'datasample' for input arguments
of type 'double'.
Error in ==> randomselection at 44
data = datasample(fulldata,6,1000)
You could instead to something like this to get it without relying on datasample: