필터 지우기
필터 지우기

How to handle overflows of int16

조회 수: 2 (최근 30일)
Micke Malmström
Micke Malmström 2015년 11월 26일
편집: Micke Malmström 2015년 11월 26일
I get a vector of int16 from a VISA-instrument where the values have rolled over if to big, the vector has an offset that I want to subtract but then the values just becomes floored at - 32768.
The question comes down to how can I make int16(-2^15-1) = 32767 ?

채택된 답변

Micke Malmström
Micke Malmström 2015년 11월 26일
편집: Micke Malmström 2015년 11월 26일
Ok this it what I do: >> mod(-2^15-1+(+2^15),2^16)+(-2^15) ans = 32.7670e+003

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by