亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? metrop.m

?? 有關kalman濾波及其一些變形濾波算法
?? M
字號:
function [samples, energies, diagn] = metrop(f, x, options, gradf, varargin)
%METROP	Markov Chain Monte Carlo sampling with Metropolis algorithm.
%
%	Description
%	 SAMPLES = METROP(F, X, OPTIONS) uses the Metropolis algorithm to
%	sample from the distribution P ~ EXP(-F), where F is the first
%	argument to METROP.   The Markov chain starts at the point X and each
%	candidate state is picked from a Gaussian proposal distribution and
%	accepted or rejected according to the Metropolis criterion.
%
%	SAMPLES = METROP(F, X, OPTIONS, [], P1, P2, ...) allows additional
%	arguments to be passed to F().  The fourth argument is ignored, but
%	is included for compatibility with HMC and the optimisers.
%
%	[SAMPLES, ENERGIES, DIAGN] = METROP(F, X, OPTIONS) also returns a log
%	of the energy values (i.e. negative log probabilities) for the
%	samples in ENERGIES and DIAGN, a structure containing diagnostic
%	information (position and acceptance threshold) for each step of the
%	chain in DIAGN.POS and DIAGN.ACC respectively.  All candidate states
%	(including rejected ones) are stored in DIAGN.POS.
%
%	S = METROP('STATE') returns a state structure that contains the state
%	of the two random number generators RAND and RANDN. These are
%	contained in fields randstate,  randnstate.
%
%	METROP('STATE', S) resets the state to S.  If S is an integer, then
%	it is passed to RAND and RANDN. If S is a structure returned by
%	METROP('STATE') then it resets the generator to exactly the same
%	state.
%
%	The optional parameters in the OPTIONS vector have the following
%	interpretations.
%
%	OPTIONS(1) is set to 1 to display the energy values and rejection
%	threshold at each step of the Markov chain. If the value is 2, then
%	the position vectors at each step are also displayed.
%
%	OPTIONS(14) is the number of samples retained from the Markov chain;
%	default 100.
%
%	OPTIONS(15) is the number of samples omitted from the start of the
%	chain; default 0.
%
%	OPTIONS(18) is the variance of the proposal distribution; default 1.
%
%	See also
%	HMC
%

%	Copyright (c) Ian T Nabney (1996-2001)

if nargin <= 2
  if ~strcmp(f, 'state')
    error('Unknown argument to metrop');
  end
  switch nargin
    case 1
      % Return state of sampler
      samples = get_state(f);	% Function defined in this module
      return;
    case 2
      % Set the state of the sampler
      set_state(f, x);		% Function defined in this module
      return;
  end
end

display = options(1);
if options(14) > 0
  nsamples = options(14);
else
  nsamples = 100;
end
if options(15) >= 0
  nomit = options(15);
else
  nomit = 0;
end
if options(18) > 0.0
  std_dev = sqrt(options(18));
else
  std_dev = 1.0;   % default
end			
nparams = length(x);

% Set up string for evaluating potential function.
f = fcnchk(f, length(varargin));

samples = zeros(nsamples, nparams);		% Matrix of returned samples.
if nargout >= 2
  en_save = 1;
  energies = zeros(nsamples, 1);
else
  en_save = 0;
end
if nargout >= 3
  diagnostics = 1;
  diagn_pos = zeros(nsamples, nparams);
  diagn_acc = zeros(nsamples, 1);
else
  diagnostics = 0;
end

% Main loop.
n = - nomit + 1;
Eold = feval(f, x, varargin{:});	% Evaluate starting energy.
nreject = 0;				% Initialise count of rejected states.
while n <= nsamples

  xold = x;
  % Sample a new point from the proposal distribution
  x = xold + randn(1, nparams)*std_dev;

  % Now apply Metropolis algorithm.
  Enew = feval(f, x, varargin{:});	% Evaluate new energy.
  a = exp(Eold - Enew);			% Acceptance threshold.
  if (diagnostics & n > 0)
    diagn_pos(n,:) = x;
    diagn_acc(n,:) = a;
  end
  if (display > 1)
    fprintf(1, 'New position is\n');
    disp(x);
  end

  if a > rand(1)	% Accept the new state.
    Eold = Enew;
    if (display > 0)
      fprintf(1, 'Finished step %4d  Threshold: %g\n', n, a);
    end
  else			% Reject the new state
    if n > 0
      nreject = nreject + 1;
    end
    x = xold;	% Reset position 
    if (display > 0)
      fprintf(1, '  Sample rejected %4d.  Threshold: %g\n', n, a);
    end
  end
  if n > 0
    samples(n,:) = x;			% Store sample.
    if en_save 
      energies(n) = Eold;		% Store energy.
    end
  end
  n = n + 1;
end

if (display > 0)
  fprintf(1, '\nFraction of samples rejected:  %g\n', ...
          nreject/(nsamples));
end

if diagnostics
  diagn.pos = diagn_pos;
  diagn.acc = diagn_acc;
end

% Return complete state of the sampler.
function state = get_state(f)

state.randstate = rand('state');
state.randnstate = randn('state');
return

% Set state of sampler, either from full state, or with an integer
function set_state(f, x)

if isnumeric(x)
  rand('state', x);
  randn('state', x);
else
  if ~isstruct(x)
    error('Second argument to metrop must be number or state structure');
  end
  if (~isfield(x, 'randstate') | ~isfield(x, 'randnstate'))
    error('Second argument to metrop must contain correct fields')
  end
  rand('state', x.randstate);
  randn('state', x.randnstate);
end
return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91首页免费视频| 五月天久久比比资源色| 国产一区视频导航| 精品日韩在线一区| 久久er99热精品一区二区| 欧美mv日韩mv国产| 国产福利电影一区二区三区| 国产精品乱子久久久久| 91在线码无精品| 亚洲午夜三级在线| 国产精品系列在线| 91麻豆免费观看| 日韩电影在线一区二区三区| 欧美刺激午夜性久久久久久久 | 国产欧美久久久精品影院| 成人久久视频在线观看| 亚洲美女屁股眼交| 欧美日本一道本在线视频| 韩国一区二区三区| 亚洲欧洲韩国日本视频| 欧美日韩中文字幕精品| 狠狠v欧美v日韩v亚洲ⅴ| 国产精品国产三级国产普通话三级 | 精品国精品国产| zzijzzij亚洲日本少妇熟睡| 亚洲mv大片欧洲mv大片精品| 久久免费午夜影院| 在线视频观看一区| 免费成人美女在线观看.| 国产欧美日韩麻豆91| 欧美丝袜丝nylons| 国产一区二区三区在线观看免费视频| 中文字幕亚洲在| 日韩视频一区二区三区在线播放| 成人午夜在线视频| 青青青伊人色综合久久| 国产精品麻豆网站| 日韩欧美国产一区在线观看| 91尤物视频在线观看| 九九精品一区二区| 亚洲一区在线看| 欧美国产日韩亚洲一区| 久久精品夜色噜噜亚洲a∨| 91麻豆精品秘密| 国产美女视频一区| 三级亚洲高清视频| 亚洲人亚洲人成电影网站色| 亚洲精品一区二区在线观看| 欧美日韩精品系列| jizz一区二区| 国产一区二区在线电影| 天堂在线一区二区| 一区二区在线观看av| 国产精品乱人伦| 26uuu色噜噜精品一区| 在线成人午夜影院| 91福利在线导航| 91小视频在线观看| 国产盗摄女厕一区二区三区| 久久国产剧场电影| 青青青伊人色综合久久| 亚洲成av人综合在线观看| 亚洲精品高清在线| 国产精品第四页| 国产精品你懂的| 国产日韩欧美a| 久久久欧美精品sm网站| 日韩视频免费观看高清完整版在线观看 | 国产成人精品亚洲日本在线桃色| 美女任你摸久久| 日韩成人午夜电影| 亚洲电影第三页| 成人av先锋影音| 国产一区二区三区免费播放| 久久国产精品99精品国产| 日韩高清国产一区在线| 日韩高清在线不卡| 奇米影视一区二区三区| 日本欧洲一区二区| 男女男精品视频| 激情综合网av| 国产成人av影院| 成人av在线资源网站| 粉嫩在线一区二区三区视频| 成人午夜精品在线| 成人国产精品免费观看视频| eeuss鲁一区二区三区| 99精品在线免费| 在线这里只有精品| 欧美三级欧美一级| 6080yy午夜一二三区久久| 91精品国产综合久久福利软件| 欧美美女喷水视频| 日韩精品在线网站| 久久精品亚洲乱码伦伦中文 | 日韩激情一二三区| 奇米影视一区二区三区小说| 经典三级在线一区| 国产福利精品导航| 91黄色免费观看| 欧美一区二区在线不卡| 久久日一线二线三线suv| 欧美国产综合色视频| 亚洲黄一区二区三区| 日韩综合一区二区| 国产一区免费电影| 99国产精品国产精品毛片| 欧美中文字幕一区二区三区 | 激情丁香综合五月| 成人成人成人在线视频| 欧美午夜在线一二页| 欧美大片国产精品| 亚洲国产精品ⅴa在线观看| 天天影视色香欲综合网老头| 国产综合成人久久大片91| 97久久超碰精品国产| 6080午夜不卡| 国产精品麻豆一区二区| 日韩专区中文字幕一区二区| 高清在线不卡av| 精品视频1区2区| 久久久久久电影| 亚洲福利电影网| 国产精品白丝jk白祙喷水网站| 一本大道av伊人久久综合| 日韩视频在线永久播放| 亚洲欧美日韩国产一区二区三区| 免费欧美在线视频| 99国产精品久久久久久久久久 | 国产一区欧美一区| 欧美最新大片在线看| 久久久久久久久久久99999| 亚洲亚洲人成综合网络| 成人午夜在线播放| 日韩免费电影网站| 亚洲午夜久久久| 成人少妇影院yyyy| 精品久久久久久久久久久院品网| 最好看的中文字幕久久| 国产一区二区三区久久悠悠色av| 欧洲一区在线电影| 国产精品拍天天在线| 美国一区二区三区在线播放| 欧美在线不卡视频| 最新国产精品久久精品| 国产精品原创巨作av| 91精品国产一区二区三区 | 亚洲免费高清视频在线| 国产精品影视天天线| 日韩美女视频在线| 亚洲一区二区三区在线| 色综合久久88色综合天天| 日本欧美在线看| 欧美在线免费观看视频| 亚洲精品videosex极品| eeuss影院一区二区三区 | 国产精品毛片久久久久久久| 精品一区二区三区影院在线午夜| 9191国产精品| 偷窥少妇高潮呻吟av久久免费| 色综合天天天天做夜夜夜夜做| 中文字幕的久久| 国产成人小视频| 国产人久久人人人人爽| 国产精品一区二区x88av| 久久日一线二线三线suv| 精品一区精品二区高清| 精品国产乱码久久久久久1区2区| 久热成人在线视频| 精品少妇一区二区三区日产乱码| 日本美女一区二区三区视频| 欧美一区二区国产| 美女网站一区二区| 精品三级av在线| 国产精品一二三四区| 久久久天堂av| 不卡视频免费播放| 亚洲欧美日韩久久| 欧美性猛交xxxx黑人交| 亚洲777理论| 欧美一区二区三区爱爱| 麻豆成人久久精品二区三区红 | 国产制服丝袜一区| 国产亚洲一区二区三区四区| 国产成人精品一区二| 1000部国产精品成人观看| 91国偷自产一区二区使用方法| 亚洲制服丝袜在线| 91精品国产91热久久久做人人| 日本欧美大码aⅴ在线播放| 欧美r级在线观看| 欧美疯狂做受xxxx富婆| 麻豆精品在线看| 国产欧美综合在线观看第十页| av一二三不卡影片| 天天综合日日夜夜精品| 久久久影视传媒| 色94色欧美sute亚洲13| 日本麻豆一区二区三区视频| 国产日韩欧美制服另类|