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

5 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 3 de Ag. de 2020
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]

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by