Info

This question is closed. Reopen it to edit or answer.

Does anyone know how to format the numeric entries in a Table Reporter?

1 view (last 30 days)
The following code generates a short pdf report containing a table of random numbers. I need to format the numeric entries. Any ideas?
import mlreportgen.report.*
import mlreportgen.dom.*
report = Report('tables');
%add 'table reporter' table.
obj.reporterTable = BaseTable(array2table(rand(4,3)));
add(report,obj.reporterTable);
rptview(report);

Answers (1)

madhan ravi
madhan ravi on 16 Nov 2018
Doesn‘t this help?
P.S - I don‘t have report generator.
I believe sprintf() with specific format should solve your problem.
  1 Comment
cmcnabb
cmcnabb on 17 Nov 2018
I don't know how to access the individual table entries in order to apply the sprintf command. Can you edit the example code to show me where 'sprintf()' would be applied?

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!