0

I have data similar to this:

x = 0:0.1:10; y = exppdf(x,2); plot(x,y, 'o')

and then I want to have some resampled data close to them, but when I use the command below , the resampled data are really far from the original one!

[resampling, bootsam]=bootstrp(100, 'corr', x,y); plot(x,y(bootsam(:,100)), 'r*')

Could you please help me? I guess I need to change option 'corr' in the bootstrp command.

Siguza
  • 21,155
  • 6
  • 52
  • 89
user1331843
  • 123
  • 1
  • 6
  • 15
  • Please define what you want to do in terms of "resampling". i.e. give some sample input and output values for x and y. What you are currently plotting after `bootstrp` is your original x against randomly selected values out of y - it will never be close to the original. – nkjt Oct 25 '13 at 15:54

1 Answers1

0

I think this is what you are trying to do:

plot(x, sort(y(bootsam(:,100)), 'descend'), 'r*')

or maybe this:

plot(x(bootsam(:,100)),y(bootsam(:,100)), 'r*')

I guess it depends on what x is for you.