XLS read function round off values while reading. Even in raw data type. How to get full value?
2 次查看(过去 30 天)
显示 更早的评论
I'am using xls read to get complete data from csv, which contail values like "0.00000099999" , "1254.632589.0", "0.0001236547". but while reading data by using this method m getting round off values like "0.0000001","1254.6326" etc. How can i fetch exact values using only this function. My entire code depends on raw, num, text file so i cannot use another function.
Using MATLAB16b.
Thanks in advance.
0 个评论
回答(1 个)
Cris LaPierre
2020-8-3
I can test in r2017a and it's reading in as expected. It doesn't know what to do with your 2nd number since there are two decimal points in it, so it reads it in as text instead of as a number.
>> [num,txt,raw]=xlsread('roundoff.csv')
num =
1.0e-03 *
0.0010 NaN 0.1237
txt =
cell
'1254.632589.0'
raw =
1×3 cell array
[9.9999e-07] '1254.632589.0' [1.2365e-04]
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!