How to make matlab output a matrix in engineering notation?

21 views (last 30 days)
I am tryign to make matlab output a matrix for me in a notation so it shows me numbers inside the matrix with its own notation.
every time I make a matrix it outputs it as:
1.0e+09 *
0.6750 0.4938 0.4115
0.4938 2.3209 0.4115
0.4115 0.4115 0.5021
lets say some of the numbers are a lot smaller than the others it will give me something like
1.0e+09 *
0.6750 0.4938 0.4115
0.4938 2.3209 0.4115
0.0000 0.0000 0.5021
When in fact they are not 0.0000 it's just a lot smaller than the rest.
how would I make matlab give me this matrix showing me the numbers that are supressed? It can be in engineering notation for every value inside of the matrix or anyway you would like, as long as i can see what numbers those are.

Accepted Answer

Walter Roberson
Walter Roberson on 25 Apr 2019
Give the command
format short e %engineering notation always
or
format short g %most convenient notation
To get more digits use "long" instead of "short"

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!