「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」を解決するにはどうすればよいですか?
Show older comments
マルコフ連鎖のMATLAB関数について質問です。
https://jp.mathworks.com/help/econ/dtmc.html
「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」のエラーを回避し、
mc = dtmc(P)を実行後のmc.Pを編集可能にしたいのですが、どうすればよいでしょうか?
1 Comment
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]
Accepted Answer
More Answers (0)
Categories
Find more on Markov Chain Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!