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

📄 mcmctrace.m

📁 马尔可夫链
💻 M
字号:
% MCMCTRACE - trace plots% Copyright (c) 1998, Harvard University. Full copyright in the file Copyright%%   mcmctrace(A)%% A = an array of MCMC output, the last dimension%     is the index of the different samples%% The resulting graph will be an array of trace% plots of the values over time.  %% if the first element of each trace is NaN, the% trace plot will be empty.%% See also: MCMCLT, MCMCSUMMfunction mcmctrace(A) dd = size(A) ;ll = length(dd) ;d1 = dd(1) ;d2 = dd(2) ;if (ll==2),  aa = reshape(A, [d1 1 d2]) ;  d3 = d2 ;  d2 = 1 ;else  aa = A ;  d3 = dd(3) ;end ;ix = 0 ;for i1 = 1:d1,for i2 = 1:d2,  ix = ix + 1 ;  bb = reshape(aa(i1,i2,:),[1 d3]) ;  if ( ~isnan (bb(1,1)) ),    subplot(d1,d2,ix), plot(bb,'k-') ;  end endend

⌨️ 快捷键说明

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