Help with Bootstrap function

Hi,
I have a single data (50 numbers) set which I just want to re-sample through Bootstrap. The problem is the bootfun part as it asks for a function, I do not want to do any sort of analysis on the data. Just resample it, the matlab help section says to use [] for the bootfun, if no function is needed. So far it isn't working.
Maybe there is afunction I could use, but I do not need one considering I just have 50 data samples and nothing to compare with.

 Respuesta aceptada

bym
bym el 26 de Jun. de 2011

2 votos

you need to have 2 assignments to get the resampled data
>> r = 1 + 2.*randn(25,1);
>> [x,bootsamp]=bootstrp(25,[],r);
>> whos bootsamp
Name Size Bytes Class Attributes
bootsamp 25x25 5000 double

3 comentarios

Jun Pooh
Jun Pooh el 26 de Jun. de 2011
Thank you so much, that was the problem.
Jan
Jan el 26 de Jun. de 2011
@proecsm: I'm impressed. You found the problem without seeing the original code driven by the description "it is not working". Fine. +1
bym
bym el 29 de Jun. de 2011
@Jan Simon: Thanks, I aspire to one day be half as helpful to the community as you!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 26 de Jun. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by