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 CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by