MATLAB Answers

Precision in writetable()

조회 수: 105(최근 30일)
madhan ravi
madhan ravi 2020년 10월 26일
댓글: madhan ravi 2020년 10월 26일
Is there a way to use writetable() to export using only 2 decimals? To be able to directly export it to an excel file.

채택된 답변

dpb 2020년 10월 26일
Sadly, no. A OutputFormat formatting string or NumericPrecision option is not available.
I presume since a table can contain any data type including cells too many possibilities are opened up that TMW hasn't wanted to venture down that road.
Does seem like worthy of some design consideration for the normal cases, though, granted...
For text files, the numeric format is long g.
  댓글 수: 4
madhan ravi
madhan ravi 2020년 10월 26일
Thank you dpb and sir Walter , rounding would be appropriate for my needs.

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

추가 답변(0개)





Community Treasure Hunt

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

Start Hunting!

Translated by