plotstats.m.txt
来自「这是马尔可夫-蒙特卡罗算法的MATLAB源程序.」· 文本 代码 · 共 16 行
TXT
16 行
function PlotStats(llvec,lpvec,tlP,tlL,count,countmax)
%
% plot the log Likelihood and log Prior
%lag = 1000; % final plot
lag=50; % real-time display
figure(2),subplot(2,1,2)
plot(1:count,lpvec(1:count),'b',[0 countmax],[tlP tlP],'r:'), ylabel('log Prior')
axis([1 countmax min([lpvec(max(1,count-lag):count) tlP])-10 max([lpvec(max(1,count-lag):count) tlP])+10])
figure(2),subplot(2,1,1)
plot(1:count,llvec(1:count),'b',[0 countmax],[tlL tlL],'r:'), ylabel('log Likelihood')
axis([1 countmax min([llvec(max(1,count-lag):count) tlL])-10 max([llvec(max(1,count-lag):count) tlL])+10])
drawnow
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?