MATLAB: MATLAB xlswrite function

excelxlsxlswrite

Hello all MATLAB users:
This came to my attention,
>> x = [inf 3 4 inf];
>> xlswrite('test',x,'test');
if you open the .xls file you will notice that the inf value in xls is the "magic" number 65535.
Does anyone know the reason?

Best Answer

Because 2^16-1 is the largest number Excel can represent since it's 16 bit unsigned.