Code covered by the BSD License  

Highlights from
KML Toolbox v2.3

image thumbnail
from KML Toolbox v2.3 by Rafael Oliveira
Create KML files and view them in Google Earth. Supports 3D models, contours, overlays, and more...

bitslice(a,lowbit,highbit)
function b = bitslice(a,lowbit,highbit)
%BITSLICE(A,LOWBIT,HIGHBIT)

numbits = highbit - lowbit + 1;
b = bitshift(a,-lowbit);
b = fix(b);
b = bitand(b,bitcmp(0,numbits));
b = b/max(b(:));

Contact us