www.gusucode.com > stats 源码程序 matlab案例代码 > stats/BootstrappingMultipleStatisticsExample.m
%% Bootstrapping Multiple Statistics % This example shows how to compute and plot the means and standard % deviations of bootstraped 100 samples from a data vector. % Copyright 2015 The MathWorks, Inc. %% % Compute a sample of 100 bootstrapped means and standard deviations of % random samples taken from the vector |y|. rng default % For reproducibility y = exprnd(5,100,1); stats = bootstrp(100,@(x)[mean(x) std(x)],y); %% % Plot the bootstrap estimate pairs. plot(stats(:,1),stats(:,2),'o')