Losing precision when writing to Excel using xlswrite

조회 수: 3 (최근 30일)
itzhak mal
itzhak mal 2019년 1월 31일
댓글: Ollie A 2019년 1월 31일
Hi all, I have a matrix on MATLAB with a very percise values, such as: 2 .268073544251674e+03 but when converting to excel it only shows: 2268.1
I used the following command:
xlswrite('MatrixEvoUNSuc',EvoUnsuc)
Is there anyway I could make sure I don't lose that percision?
Thank you!!

답변 (1개)

Ollie A
Ollie A 2019년 1월 31일
It could be to do with the format of the excel cells. In excel you can increase the number of decimal places displayed.
Otherwise, I tried:
T = table(EvoUnsuc);
writetable(T,'MatrixEvoUNSuc.xls');
which seems to display the number to a higher precision.
  댓글 수: 8
madhan ravi
madhan ravi 2019년 1월 31일
instead of writing it into one single file why not write in 3 separate files?
Ollie A
Ollie A 2019년 1월 31일
I would try writing the data to a .dat or .txt file instead of .xls.
Reading the data back will be just as easy, and I'm sure the different file format will store all of your data.

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

카테고리

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