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