Hi,
I try to read a csv file with 'csvread' command, however,
values with more than 5 digits are rounded into 5 digits.
For instance;
12345.1234 -> 1.2345e+4
I need to get 1.23451234e+4
How can I increase the effective digits for csvread commnad?
Thank you inadvance.

 Akzeptierte Antwort

madhan ravi
madhan ravi am 27 Dez. 2018
Bearbeitet: madhan ravi am 27 Dez. 2018

0 Stimmen

format long % at the beginning of your code
doc format % read it
doc dlmread
doc readtable

7 Kommentare

madhan ravi
madhan ravi am 27 Dez. 2018
Haruo Kodama's answer moved here for consistency:
Actually, I tryed 'format' and 'dlmread'.
Still, I can not increase digits more than 5.
Can I use 'precision' with dlmread?
What is wrong?
madhan ravi
madhan ravi am 27 Dez. 2018
while writing the csv file use dlmwrite with precision option and then simply use dlmread to read the file
Haruo Kodama
Haruo Kodama am 27 Dez. 2018
Thank you,
I will try it !
Haruo Kodama
Haruo Kodama am 27 Dez. 2018
I tryed dlmread, but the reslts are the same.
1.2345e+4
What seems to be a promlem?
madhan ravi
madhan ravi am 27 Dez. 2018
how do I know ? you didn‘t upload your code , you didn‘t upload your file ..
Haruo Kodama
Haruo Kodama am 27 Dez. 2018
Yes ! It works !
Thank you for your support.
I just checked only works space table, and it showed only five digits,
but, once I exported data with dlmwrite + 'precision', I got right values!
It was my fault. Sorry!
Now, I found that dlmread and dlmwrite+precision are used
to increase the effective digits.
Thank you again.
madhan ravi
madhan ravi am 27 Dez. 2018
Bearbeitet: madhan ravi am 27 Dez. 2018
Anytime :) , if my answer worked make sure to accept the answer.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2018b

Community Treasure Hunt

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

Start Hunting!