Matlab rounding my values without me wanting it
2 views (last 30 days)
Show older comments
Commented: Martin on 26 Aug 2019
Hello, this basically frustrates me a bit, - if I have:
Price = 20074.5;
And I present it in my table like this:
I dont get decimals? Anyone know a way around this? I hope there can be some kind of solution without format long/short because I don't want to touch other things
Walter Roberson on 26 Aug 2019
You get that when format short or format short g or format rat or format hex is in effect.
To work around this without changing your active format, you will need to edit the function getFloatFormats() at roughly line 427 of file toolbox/matlab/datatypes/@tabular/disp.m
Find more on Logical 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!