📄 impresample.m
字号:
function [x, w] = impResample(xpar, wpar)%the resample code is derived from article named <Novel approach to nonlinear/non-Gaussian bayesian state estimation> 3.3discussion
cumw = cumsum(wpar);
N = length(xpar);
for i=1:N
r = rand;
j=1;
while cumw(j)<r
j = j+1;
end
x(i) = xpar(j);
end
w = 1/N*ones(N,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -