Formatting a double for output in message box
Show older comments
Hi,
in my program i have a message box, which informs the user that an activity has been terminated and also display the activities consumption. Something like this: 'The activity xxx has been terminated and the consumption was 4.925971e-01 kWh'
My problem: how do i get that (fairly) ugly and unreadable value '4.925971e-01' to the handy format of '0.492'?
Cheers, Mathias
Accepted Answer
More Answers (0)
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!