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?

1 vue (au cours des 30 derniers jours)
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.

Réponses (1)

Chad Greene
Chad Greene le 14 Août 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')

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by