Merging mk rev. 211, 212: Matlab interface now works with binary data using uint32 (GAIndividualIntegerData).

This commit is contained in:
Marcel Kronfeld
2008-09-19 12:49:13 +00:00
parent 45d35a68e3
commit d6f2ec1ad1
12 changed files with 359 additions and 235 deletions

View 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