All ProgramsCAEMatLabMatLab Programming

Displaying Various Number Formats In Matlab®(Illustrated Expression)

In this article on Mechanical Base, we will show the number and integer types in Matlab®. Before starting to learn Matlab® coding, you need to know the integer types and how to show them in an intended way in Matlab®. There is a command in Matlab® to do it.

YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!

How To Display Different Number Formats In MatLab® Language?

>> format long

a =



If you want to show a number that has a very long decimal part on a long basis, you could type “format long” to show it in the first 16 characters at Command Window at Matlab® as above.


a =



If you do not use the “format long” code to show a number, the same number will be shown as above. The scientific expression as shown above means 10^8 in Matlab®.

>> format short

a =



Also, you can use “format short” code as shown above, the long decimal number or long integers will be shown as in 6 characters at Matlab® Command Window.

>> a = 100063226060.32622236;

If you have a number like “a” in Matlab®, you can show this number’s intended decimals with the “fprintf” command as shown above. “1.10f” the 10f inside this code means, you want to show 10 strings after the decimal point of this number in the Matlab® Command Window.


The expression and displaying of numbers in Matlab® is like that.

Do not forget to leave your comments and questions below about displaying of numbers in Matlab® below. 

If you want further coding examples about displaying of numbers in Matlab®, inform us in the comments.

This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®

Your precious feedbacks are very important to us.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button