Precision lost while reading from Excel file to a Matlab table
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi,
I am using readtable to read a large high precision matrix from Excel. How to make sure I read the entire decimal points? Thanks,
Jennifer
댓글 수: 2
dpb
2016년 10월 31일
How did you determine there was a loss of precision? If the values in the spreadsheet are numeric, then by default readtable will read them as double precision which is the same as what Excel uses.
Show your work and a sample of the data...
채택된 답변
Walter Roberson
2016년 10월 31일
readtable() will read the entire binary content that is present in Excel.
However, when you display the output of readtable, the output might not show the entire content. The output would depend upon the "format" command that is in effect.
댓글 수: 2
Walter Roberson
2016년 10월 31일
This is not a matter of the readtable() 'Format' option.
At the MATLAB command line give the command
format long g
and display the table again.
The default output is "format short" which is only 4 decimal places.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!