MATLAB does not have any 24 bit data type.
typecast() is only for taking a block of memory and changing the interpretation of the block without altering any of the values -- for example, taking a pair of unsigned 8 bit integers and re-interpeting it as a signed 16 bit integer.
Are your values 24 bit signed integers that have been packed into 32 bit unsigned integers, four 24 bit values (96 bits) packed into 3 uint32 (96 bits) ? If so then what byte order has been used? An additional byte will need to be provided for each, and possibly bytes will need to be re-arranged. In my experience, 24 bit values are typically stored MSB first, which is not how bytes are arranged in any current release of MATLAB.
Best Answer