Missing values occur after converting data type.
古いコメントを表示

Problem :
From the figure above, I calculated by using data type as double.
And when I convert the data type from double to uint16, the value before and after data type conversion block are not same even if there is no process.
Questions :
Can you explain the reason and solution for this problem?
4 件のコメント
Mehmed Saad
2020 年 4 月 8 日
編集済み: Mehmed Saad
2020 年 4 月 8 日
integer rounding mode Floor, i guess
you value might be 4-eps
change it to round (i dont know if that's an option but i think it should be)
Phannakarn Saingthong
2020 年 4 月 8 日
Mehmed Saad
2020 年 4 月 8 日
your value might be a bit smaller than 4 and it's not showing it because of the format
for example, type following in cmd
4 - 1e-15
ans =
4.0000
Now type
format long
4- 1e-15
ans =
3.999999999999999
floor(ans)
ans =
3
Phannakarn Saingthong
2020 年 4 月 8 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で String についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
