MATLAB: What is the function to show 1/2 like below

display format

I know it's a simple question. But I just don't know which keyword should be used for searching it.
1
-
2

Best Answer

Try pretty(). This will, however, work with symbolic expressions. For example,
pretty(sym(333/1000))
333
----
1000
or
pretty(sym(0.125))
1
-
8