Importing text to cell, avoid conversion to scientific notation

4 vues (au cours des 30 derniers jours)
Victoria Lawlor
Victoria Lawlor le 26 Oct 2015
Commenté : Star Strider le 26 Oct 2015
I'm wondering how I can import a tab delimited text file into a cell without having it convert to scientific notation.
  1 commentaire
Stephen23
Stephen23 le 26 Oct 2015
Modifié(e) : Stephen23 le 26 Oct 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.

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 26 Oct 2015
The format function dictates how data are displayed in the Command Window and tooltips. Full precision is maintained internally.
  4 commentaires
Victoria Lawlor
Victoria Lawlor le 26 Oct 2015
"format long g" worked, thanks
Star Strider
Star Strider le 26 Oct 2015
My pleasure.

Connectez-vous pour commenter.

Plus de réponses (1)

Thorsten
Thorsten le 26 Oct 2015
You can use dlmread for this task.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by