Issue with precision using days function
이전 댓글 표시
I have a varriable x (this x was generated by reading an excel file). Using variable explorer I can see: x=0.465277777777778.
If I do the following:
y = days(0.465277777777778);
y.Format = 'hh:mm:ss'
I get:
11:10:00
Which is correct, as it is in the excel file. However, when instead I use the variable, like this
y=days(x) =
y.Format 'hh:mm:ss'
I get:
11:09:59
As you see there is a second of difference. How can I fix this so that I get the correct value (11:10:00) using the variable x?
Obs: when I get do x - 0.465277777777778, I get -2.775557561562891e-16. So I think it has to do with precision.
I appreciate any hint. Thanks
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
