?? 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 + -