XLS read function round off values while reading. Even in raw data type. How to get full value?

2 ビュー (過去 30 日間)
as
as 2020 年 8 月 3 日
回答済み: Cris LaPierre 2020 年 8 月 3 日
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.

回答 (1 件)

Cris LaPierre
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]

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by