필터 지우기
필터 지우기

Signed decimal vector to hexadecimal

조회 수: 5 (최근 30일)
Nourhan
Nourhan 2014년 5월 21일
댓글: dpb 2014년 5월 21일
Hello everyone,
How can I convert signed decimal values into hex? All the functions in Matlab are for unsigned decimal values. I tried to convert the decimal values into 2s complement and then into hex but the values were not the correct.
Anyone could help?
  댓글 수: 1
dpb
dpb 2014년 5월 21일
>> sprintf('%x', typecast(int16(-3),'uint16'))
ans =
fffd
>>

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by