马尔可夫编程matlab.docVIP

  • 11
  • 0
  • 约3.03千字
  • 约 3页
  • 2020-01-29 发布于浙江
  • 举报
%function [chain,state]=markov(T,n,s0,V); %function [chain,state]=markov(T,n,s0,V); % chain generates a simulation from a Markov chain of dimension % the size of T % % T is transition matrix % n is number of periods to simulate % s0 is initial state (initial probabilities) % V is the quantity corresponding to each state % state is a matrix recording the number of the realized state at time t % % Original author: Tom Sargent % Comments added by Qiang Chen [r c]=size(T); % r is # of rows, c is # of columns of T if nargin == 1; % nargin refers to number of arguments in. So only T is pro

文档评论(0)

1亿VIP精品文档

相关文档