Merging mk rev. 211, 212: Matlab interface now works with binary data using uint32 (GAIndividualIntegerData).
This commit is contained in:
14
resources/MatlabInterface/@JEInterface/convertUnsignedJE.m
Normal file
14
resources/MatlabInterface/@JEInterface/convertUnsignedJE.m
Normal file
@@ -0,0 +1,14 @@
|
||||
function [ z ] = convertUnsignedJE( int, x )
|
||||
%CONVERTUNSIGNEDJE Convert signed 32-bit integer to unsigned.
|
||||
% Detailed explanation goes here
|
||||
|
||||
z=zeros(size(x,1),size(x,2), 'uint32');
|
||||
for j=1 : size(x,1)
|
||||
for i=1 : size(x,2)
|
||||
if (x(j,i) < 0)
|
||||
z(j,i) = 1+bitxor(uint32(-x(j,i)), int.hexMask);
|
||||
else
|
||||
z(j,i) = x(j,i);
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user