一步转移矩阵matlab代码.zip

  • 惊喜kk
    了解作者
  • matlab
    开发工具
  • 6KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2021-03-02 00:59
    上传日期
马尔科夫预测模型中的一步转移矩阵代码,包含具体程序命令及参数如何修改
一步转移矩阵matlab代码.zip
  • 一步转移矩阵matlab代码.doc
    30KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/622bbc483d2fbb0007804c9a/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622bbc483d2fbb0007804c9a/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">info=<span class="_ _0"></span>[]</div><div class="t m0 x1 h4 y3 ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#27492;&#26102;&#20320;&#24050;&#32463;&#36755;&#20837;&#27604;&#20363;&#30697;&#38453;<span class="_ _1"> </span></span>inf<span class="_ _0"></span>o</div><div class="t m0 x1 h4 y4 ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#21442;&#25968;&#20462;&#25913;</span></div><div class="t m0 x1 h4 y5 ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#27492;&#26102;&#20320;&#24050;&#32463;&#36755;&#20837;&#27604;&#20363;&#30697;&#38453;<span class="_ _1"> </span></span>inf<span class="_ _0"></span>o</div><div class="t m0 x1 h4 y6 ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#21442;&#25968;&#20462;&#25913;</span></div><div class="t m0 x1 h4 y7 ff1 fs0 fc0 sc0 ls0 ws0">P = z<span class="_ _0"></span>eros(4); %<span class="ff2">&#25152;&#27714;&#36716;&#31227;&#30697;&#38453;&#38454;&#25968;&#65292;&#26412;&#20363;&#20013;&#20026;<span class="_ _1"> </span></span>5<span class="ff2">&#12290;</span></div><div class="t m0 x1 h4 y8 ff1 fs0 fc0 sc0 ls0 ws0">for k = 1<span class="_ _0"></span>:3 %k<span class="_"> </span><span class="ff2">&#20026;&#24180;&#20221;&#38388;&#38548;&#25968;&#65292;&#26412;&#20363;&#20013;&#20026;<span class="_ _1"> </span></span>5<span class="ff2">&#12290;</span></div><div class="t m0 x1 h4 y9 ff1 fs0 fc0 sc0 ls0 ws0"> for i = 1:4 %i<span class="_ _1"> </span><span class="ff2">&#20026;&#29366;&#24577;&#25968;&#65292;&#26412;&#20363;&#20013;&#20026;<span class="_ _1"> </span></span>5<span class="ff2">&#12290;</span></div><div class="t m0 x1 h4 ya ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#27492;&#22788;&#21442;&#25968;&#20462;&#25913;&#32467;&#26463;&#65292;&#21518;&#38754;&#36824;&#26377;&#19968;&#22788;&#20462;&#25913;</span></div><div class="t m0 x1 h4 yb ff1 fs0 fc0 sc0 ls0 ws0">%--<span class="ff2">&#20197;&#19979;&#20869;&#23481;&#26080;&#38656;&#25913;&#21160;</span>--%</div><div class="t m0 x1 h3 yc ff1 fs0 fc0 sc0 ls0 ws0"> front<span class="_ _0"></span> = 0;</div><div class="t m0 x1 h3 yd ff1 fs0 fc0 sc0 ls0 ws0"> back = 0;</div><div class="t m0 x1 h3 ye ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h4 yf ff1 fs0 fc0 sc0 ls0 ws0"> if (i ~= 1) %<span class="ff2">&#23545;&#24212;&#65288;</span>2<span class="ff2">&#65289;&#65288;<span class="_ _2"> </span></span>3<span class="ff2">&#65289;</span></div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y11 ff1 fs0 fc0 sc0 ls0 ws0"> up = info(k+1<span class="_ _0"></span>,i);</div><div class="t m0 x1 h3 y12 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y13 ff1 fs0 fc0 sc0 ls0 ws0"> if(info(k+1,1)&gt;<span class="_ _0"></span>info(k,1))</div><div class="t m0 x1 h3 y14 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0"> for n = 2:i</div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0"> fron<span class="_ _0"></span>t = front + inf<span class="_ _0"></span>o(k,n);</div><div class="t m0 x1 h3 y17 ff1 fs0 fc0 sc0 ls0 ws0"> end</div><div class="t m0 x1 h3 y18 ff1 fs0 fc0 sc0 ls0 ws0"> for n = 2:i-1</div><div class="t m0 x1 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0"> back = back + info(k+1,n);</div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0"> end</div><div class="t m0 x1 h3 y1b ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y1c ff1 fs0 fc0 sc0 ls0 ws0"> down = fron<span class="_ _0"></span>t - back;</div><div class="t m0 x1 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0"> P(i,i) = up / down;</div><div class="t m0 x1 h3 y1e ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc0 ls0 ws0"> elseif(info<span class="_ _0"></span>(k+1,1)&lt;info(k,1))</div><div class="t m0 x1 h3 y20 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y21 ff1 fs0 fc0 sc0 ls0 ws0"> for n = 1:i</div><div class="t m0 x1 h3 y22 ff1 fs0 fc0 sc0 ls0 ws0"> fron<span class="_ _0"></span>t = front + inf<span class="_ _0"></span>o(k,n);</div><div class="t m0 x1 h3 y23 ff1 fs0 fc0 sc0 ls0 ws0"> end</div><div class="t m0 x1 h3 y24 ff1 fs0 fc0 sc0 ls0 ws0"> for n = 1:i-1</div><div class="t m0 x1 h3 y25 ff1 fs0 fc0 sc0 ls0 ws0"> back = back + info(k+1,n);</div><div class="t m0 x1 h3 y26 ff1 fs0 fc0 sc0 ls0 ws0"> end</div><div class="t m0 x1 h3 y27 ff1 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h3 y28 ff1 fs0 fc0 sc0 ls0 ws0"> down = fron<span class="_ _0"></span>t - back;</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐