[Simulink] chart内でカウントアップを記述する方法
Ältere Kommentare anzeigen
Simulinkの"chart"(ステートマシン)内で、カウントアップを記述するにはどのようにすればよいでしょうか。
具体的には添付の図の通り、遷移の際にパラメータ"cnt"の値を"1"だけ増やす処理をどのように記載すればよいか教えていただきたいです。
図の状況で実行すると、
「タイプの不一致: embedded.fi {ufix4} ~= embedded.fi {ufix5}.」
というエラーが発生します。いま"cnt"はfixdt(0,4,0)型としているため、1を加算することで5bit幅に増加する可能性があるという理解ですが、その場合は5bit目を切り捨てる処理で構いません。
ご確認お願い致します。

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 固定小数点 finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




