how to read 12bit raw data faster
27 views (last 30 days)
Jan on 7 Feb 2012
You can read all 16 bits and set the upper 4 bits to zero:
data = fread(p, [768,1024], 'uint16');
b = uint32(rem(data, 4096));
I assume you can use the format 'uint16=>uint32' directly - please test if this is faster and if rem works on UINT32 arrays.