Importing text to cell, avoid conversion to scientific notation

I'm wondering how I can import a tab delimited text file into a cell without having it convert to scientific notation.

1 Kommentar

Stephen23
Stephen23 am 26 Okt. 2015
Bearbeitet: Stephen23 am 26 Okt. 2015
The standard MATLAB file-reading functions read data with the full double precision, and do not "convert to scientific notation". When data is displayed in the command window it is often shown in scientific notation, but this is not the same thing as how it is stored. You can use format to change how numeric values are displayed.
Summary: displaying numeric variables is a different topic to how they are stored.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Star Strider
Star Strider am 26 Okt. 2015

0 Stimmen

The format function dictates how data are displayed in the Command Window and tooltips. Full precision is maintained internally.

4 Kommentare

Even when I write "format long" I still get scientific notation, it gives me a few more numbers at the end but still not the full number.
Then that is simply the nature of your data. If they are >1 and <10^15 or so, you can get all the digits to display with format long. If they’re larger that 10^+15 or smaller than about 10^-15, there’s no way to avoid scientific notation.
The only other option is probably format rat, but that’s probably not what you’re going for.
"format long g" worked, thanks
My pleasure.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Community Treasure Hunt

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

Start Hunting!

Translated by