📄 particle_choose.m
字号:
function [xhat]=particle_choose(xP,wP)
%This routine is used to choose the
%xP particles
%wP weight
%Mn optional string to get mean
%Vnc optional string to get variance
global nTx nRx Npart
method = 'expected';
wP = wP/sum(wP);
xhat = zeros(nRx,nTx);
switch method
case 'weighted'
%Take particle with largest weight
[Y,I]= max(wP);
xhat = xP(:,:,I);
case 'expected',
for p = 1:Npart,
xhat = xhat + wP(p)*xP(:,:,p);
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -