问题描述
我有类似的数据:
x = 0:0.1:10;y = exppdf(x,2);plot(x,y, 'o')
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*')
[resampling, bootsam]=bootstrp(100, 'corr', x,y);plot(x,y(bootsam(:,100)), 'r*')
能请你帮我吗?我想我需要在bootstrp命令中更改选项"corr".
Could you please help me? I guess I need to change option 'corr' in the bootstrp command.
推荐答案
我认为这是您要尝试做的事情:
I think this is what you are trying to do:
plot(x, sort(y(bootsam(:,100)), 'descend'), 'r*')
或者也许是这样:
plot(x(bootsam(:,100)),y(bootsam(:,100)), 'r*')
我想这取决于x是给你的.
I guess it depends on what x is for you.
这篇关于在MATLAB中引导数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!