⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resamplemlp.m

📁 非常不错的非线性非高斯环境下的粒子滤波程序进化算法
💻 M
字号:
function [x,P] = resamplemlp(xu,q,P);% PURPOSE : Performs the resampling stage of the hybrid SIR%           in order(number of samples) steps.% INPUTS  : - xu = The networks weights samples.%           - q = Normalised importance ratios.%           - P = The weights covariance for each trajectory.% OUTPUTS : - x = Resampled networks weights samples.%           - P = Resampledweights covariance for each trajectory.% AUTHOR  : Nando de Freitas - Thanks for the acknowledgement :-)% DATE    : 08-09-98if nargin < 2, error('Not enough input arguments.'); end[N,time,numWeights] = size(xu);u = rand(N+1,1);t = -log(u);x = 10.*ones(size(xu));T = cumsum(t);Q = cumsum(q);% RESAMPLING:% ==========i = 1;j = 1;Ptmp=P;while j <= N,  if (Q(j)*T(N)) > T(i)    x(i,:,:) = xu(j,:,:);    P(i,:,:) = Ptmp(j,:,:);     i = i+1;  else    j = j+1;  end;end;x(N,:,:)=x(N-1,:,:); % Bug: See new version with residual sampling. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -