「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」を解決するにはどうすればよいですか?
Afficher commentaires plus anciens
マルコフ連鎖のMATLAB関数について質問です。
https://jp.mathworks.com/help/econ/dtmc.html
「読み取り専用であるため、クラス 'dtmc' の 'P' プロパティを設定できません。」のエラーを回避し、
mc = dtmc(P)を実行後のmc.Pを編集可能にしたいのですが、どうすればよいでしょうか?
1 commentaire
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]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Markov Chain Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!