「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」を解決するにはどうすればよいですか?
显示 更早的评论
マルコフ連鎖のMATLAB関数について質問です。
https://jp.mathworks.com/help/econ/dtmc.html
「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」のエラーを回避し、
mc = dtmc(P)を実行後のmc.Pを編集可能にしたいのですが、どうすればよいでしょうか?
1 个评论
mc.Pを編集する為にdtmc関数を使って新たにmcを作り直せば良いと思ったのですが、直接mc.Pを変更したい理由があるのでしょうか?
mc = dtmc([0.5 0.5 0 0; 0.5 0 0.5 0; 0 0 0 1; 0 0 1 0], ...
'StateNames',["Depression" "Recession" "Stagnant" "Boom"])
mc.P
mc.P = [0.5 0.5 0 0; 0.5 0 0.5 0; 0 0 0 1; 0 0 1 0]
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Markov Chain Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!