필터 지우기
필터 지우기

How to express or write short integers in MATLAB?

조회 수: 2 (최근 30일)
Imtiaz nabi
Imtiaz nabi 2022년 6월 14일
댓글: Bjorn Gustavsson 2022년 6월 14일
Hi there, I am replicating some lines of code from C language in MATLAB evironment. Although I have completed the code but I am still getting some issues therefore, I am having some issue in the generated DATA.
Kindly if someone tell me how to properly use short in MATLAB as shown in the following picture
Here is what I am currently doing in my code
i_acc = bitshift(int16(i_acc+64),-7);
q_acc = bitshift(int16(q_acc+64),-7);
% % converting data
% i_acc = typecast(i_acc, 'int16');
% q_acc = typecast(q_acc, 'int16');
%
% Buffer
iq_buff(isamp*2)= i_acc;
iq_buff(isamp*2+1) = q_acc;
  댓글 수: 1
Bjorn Gustavsson
Bjorn Gustavsson 2022년 6월 14일
You'll get more better help faster if you explain what "some issue" is.

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

답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by