How to format individual elements in a timeseries
Show older comments
I create a timetable as follows
% Create the Black Carbon Dry Deposition Table For Bin 001 ikind=1
BCDP001Table=table(BCDP00110(:,1),BCDP00125(:,1),BCDP00150(:,1),BCDP00175(:,1),...
BCDP00190(:,1),BCDP001100(:,1),...
'VariableNames',{'BCDP00110','BCDP00125','BCDP00150',...
'BCDP00175','BCDP00190','BCDP001100'});
BCDP001TT = table2timetable(BCDP001Table,'TimeStep',timestep,'StartTime',stime);
This produces a very serviceable timetable. I would like the ability to format the columns sa as %8.4f or %12.6e
so that when the table print out every in formatted to be read in a very clear fashion. However I have not seen a good example on how to do this. I could go back and manually edit each table element using something like sprintf but I would like to retain full accuracy for calculation and plot purposes.
2 Comments
Stephen Forczyk
on 13 Jun 2023
Star Strider
on 13 Jun 2023
The best way to do that would be to duplicate the table, however using string (or charactrer vector) entries. That way, you have both — a numeric table wih full precision, and a neatly-formatted table for publication. The neatly-formatted table could be created immediately from the original table, then deleted if necessary when its existence was no longer required.
Accepted Answer
More Answers (0)
Categories
Find more on Tables 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!