2025-03-30 10:31:17 -07:00

8 lines
216 B
Matlab

function Int32Out = Int16ToInt32(Int16In)
%% 16bit转32bit
Int16In(Int16In<0) = Int16In(Int16In<0) + 65536;
tmp = reshape(Int16In,2,[]);
Int32Out = bitshift(tmp(1,:),0)+bitshift(tmp(2,:),16);
end