How can I use “datasample” to get multiple samples without a loop?
How can I create "n" samples of size "k" using "datasample" without needing a "for" loop?
To access detailed documentation on the "datasample" function, execute the following command in MATLAB R2020b:
>> web(fullfile(docroot, ‘stats/datasample.html’))
For example, if I want to sample from a 500 element vector in samples of 20, but do that 30 times, I’ve got to create a loop from i=1:30 with "datasample" inside that loop.How can I create "n" samples of size "k" using "datasample" without needing a "for" loop?
To access detailed documentation on the "datasample" function, execute the following command in MATLAB R2020b:
>> web(fullfile(docroot, ‘stats/datasample.html’))
For example, if I want to sample from a 500 element vector in samples of 20, but do that 30 times, I’ve got to create a loop from i=1:30 with "datasample" inside that loop. How can I create "n" samples of size "k" using "datasample" without needing a "for" loop?
To access detailed documentation on the "datasample" function, execute the following command in MATLAB R2020b:
>> web(fullfile(docroot, ‘stats/datasample.html’))
For example, if I want to sample from a 500 element vector in samples of 20, but do that 30 times, I’ve got to create a loop from i=1:30 with "datasample" inside that loop. MATLAB Answers — New Questions