how do you use randperm to select a m-by-n matrix of data and output a smaller subset of that random data?
i.e
newfile = randperm(data(m = 2000, n = 3)); %% save random m-by-n data as newfile
how do you use randperm to select a m-by-n matrix of data and output a smaller subset of that random data?
i.e
newfile = randperm(data(m = 2000, n = 3)); %% save random m-by-n data as newfile
Consider this example:
Note that R2011b introduced an easier syntax for RANDPERM, allowing you to directly write: