MATLAB xlswrite function

조회 수: 7 (최근 30일)
Stavros
Stavros 2011년 1월 28일
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?

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 1월 28일
Because 2^16-1 is the largest number Excel can represent since it's 16 bit unsigned.
  댓글 수: 2
Kenneth Eaton
Kenneth Eaton 2011년 1월 28일
Don't you mean unsigned 16 bit? ;)
Sean de Wolski
Sean de Wolski 2011년 1월 28일
Oops, yup.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Kenneth Eaton
Kenneth Eaton 2011년 1월 28일
The reason? Because the documentation says so! ;)
Excerpt:
  • Excel converts Inf values to 65535. MATLAB converts NaN values to empty cells.

Stavros
Stavros 2011년 1월 29일
ty all :)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by