bootstat = bootstrp(nboot, bootfun, d)
bootstat = bootstrp(nboot, bootfun, d1, ..., dN)
[bootstat, bootsam] = bootstrp(...)
[bootstat, bootsam] = bootstrp(nboot, [], d)
| Parameter | Description |
|---|---|
| nboot | positive integer number of bootstrap samples. |
| bootfun | function handle applied to each bootstrap sample. Use an empty value to return sample indices only. |
| d | numeric or logical vector or matrix. Rows are sampled with replacement. |
| Parameter | Description |
|---|---|
| bootstat | bootstrap statistics, one row per bootstrap sample. |
| bootsam | sample indices, one column per bootstrap sample. |
bootstrp draws bootstrap samples using Nelson's random generator and applies a statistic function to each sample.
rng('default');
[bootstat, bootsam] = bootstrp(20, @mean, (1:10)')