8 lines
216 B
Mathematica
8 lines
216 B
Mathematica
![]() |
|
||
|
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
|