"Emma " <emmpe781@student.liu.se> wrote in message
news:kufnq3$elp$1@newscl01ah.mathworks.com...
> Is there a matlab function turning for example 123456 to 1,23456*10^(5)
> when displaying it?
Not as far as I am aware. You will need to write your own function based on
whether you want 123456 to be displayed as:
0.123456*10^(6)
1.23456*10^(5)
12.3456*10^(4)
123.456*10^(3)
The FORMAT function gets you close to the last of those if you use the ENG
format:
>> format shorteng
>> x = 123456
x =
123.4560e+003
The SPRINTF and/or FPRINTF functions may be of use to you.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com