Why answer of uint8 in .m and mdl are different?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Walter Roberson
2015-7-27
Notice that Saturate on Integer Overflow defaults to Off; you want it to be On.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!