Does MATLAB support float16 operations? If so, how to convert a double matrix to float16? I am doing an arithmetic operation on a large matrix where 16-bit floating representation is sufficient for my representation. Representing by a double datatype takes 4 times more memory.
Share
Is your matrix full? Otherwise, try
sparse— saves a lot of memory if there’s lots of zero-valued elements.AFAIK,
float16is not supported. Lowest you can go infloat-datatype is withsingle, which is a 32-bit datatype:You could multiply by a constant and cast to
int16, but you’d lose precision.