Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to see resampled data after BOOTSTRAP in Matlab

Asked by Rajib Mozumder

Rajib Mozumder (view profile)

on 15 Jan 2013
Accepted Answer by bym

bym (view profile)

I was trying to resample (with replacement) my database using 'bootstrap' in Matlab as follows:

D = load('Data.txt');
lead = D(:,1);
depth = D(:,2);
X = D(:,3);
Y = D(:,4);
%Bootstraping to resample 100 times
[resampling100,bootsam] = bootstrp(100,'corr',lead,depth);
%plottig the bootstraping result as histogram
... ... ...
... ... ...

Though the script written above is correct, I wonder how I would be able to see/load the resampled 100 datasets created through bootstrap? 'bootsam(:)' display the indices of the data/values selected for the bootstrap samples, but not the new sample values!! Isn't it funny that I'm creating fake data from my original data and I can't even see what is created behind the scene?!?

My second question: is it possible to resample the whole matrix (in this case, D) altogether without using any function? However, I know how to create random values from a vector data using 'unidrnd'.

Thanks in advance for your help.


Rajib Mozumder

Rajib Mozumder (view profile)


No products are associated with this question.

1 Answer

Answer by bym

bym (view profile)

on 16 Jan 2013
Edited by bym

bym (view profile)

on 16 Jan 2013
Accepted answer

For your first question, you can recover the bootstrap samples by:




bym (view profile)

Contact us