Why answer of uint8 in .m and mdl are different?

1 回表示 (過去 30 日間)
nkumar
nkumar 2015 年 7 月 27 日
回答済み: Walter Roberson 2015 年 7 月 27 日
I have a value of -1.In .m file if i process uint8(-1) i get answer as 0,but in simulink if i feed a constant with -1 and use data conversion of uint8 i get answer as 255.Why do i get different answers.

採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 27 日
Notice that Saturate on Integer Overflow defaults to Off; you want it to be On.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by