⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rboot.m

📁 一个非常实用的统计工具箱
💻 M
字号:
function z = rboot(x,B)%RBOOT    Simulate a bootstrap resample from a sample.%%	  Z = rboot(X)%%	  Give a resample of the same size as X, which is assumed%	  to have one independent realisation in every row.%	  RESAMPLE(X,B) gives B columns of resamples. This form works%	  only for X one-dimensional, ie X column vector.%       Anders Holtsberg, 14-12-94%       Copyright (c) Anders Holtsbergif min(size(x)) == 1   x = x(:);endif nargin > 1 & size(x,2) > 1   if B > 1, error('X multidimensional and B > 2'), endelseif nargin < 2   B = 1;endn = size(x,1);nn = n*B;I = ceil(n*rand(nn,1));if B > 1   z = zeros(n,B);   z(:) = x(I);else   z = x(I,:);end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -