给定范围X,N间隔和重叠O,计算间隔大小

时间:2017-04-02 11:50:23

标签: algorithm matlab

我有一个范围X。 我想以N为间隔划分这个范围。 我也希望间隔重叠。 哪种算法可以让我找到我的间隔大小?

示例:

Range   = 1;  % the data ranges between 0 and 1
N       = 5;  % the range is divided in 5 intervals.
Overlap = .5; % Two neighbouring intervals overlap by 50%

StepSize = ?;

非常感谢

1 个答案:

答案 0 :(得分:0)

公式是

s = x / (n + o - n * o)