Azzera filtri
Azzera filtri

How do I change my display settings/potentially use a data format that will allow me to view lat/lon coordinates without any sort of scientific notation/engineering notation?

2 visualizzazioni (ultimi 30 giorni)
As of right now, the data is stored as doubles. I have tried using long fixed decimal format, and this turns any value such as -111.345928... into -1.11345928e2. It would be preferable to be able to fix this as I am assigning values to variables rather than changing a display format in the Matlab GUI.

Risposte (1)

Chad Greene
Chad Greene il 14 Ago 2018
You'll have to be a bit more specific about what you're trying to accomplish.
  • If you want to change how many digits are displayed in the command line, just type
format bank
which will display numbers to two decimal places until you restart Matlab.
  • If you want to round the data to a specified number of decimal places you can do something like
round(lon,3)
which would round longitudes to 3 decimal places.
  • If you want to display the number as a string and you want to specify the number of decimal places, you can do
num2str(lon,'0.3f')

Categorie

Scopri di più su Elementary Math in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by