Export a large table to a pdf file
I have a 16×23 table that I would like to export to a pdf through matlab. I have tried to turn the pdf to landscape to fit better, as well as reduce the text size. I have also tried to position it using "position" as an option in the function "uitable". I have also used the "print" function but it seems like saveas works better.
Essentially this is what I would like the output to look like (check the picture attached), but I want matlab to export and position it automatically after it runs. It can be in data form or table form.
Here is my current code:
fig = uifigure(‘Name’,’Value Averages’);
t = table([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],’VariableNames’,{‘Number of Values’,’1st value’,’2nd value’,’3rd value’,’4th value’, …
‘5th value’,’6th value’,’7th vlaue’,’8th value’,’9th value’,’10th value’,’11th value’,’12th value’,’13th value’,…
’14th value’,’15th vlaue’,’16th value’,’117th value’,’18th value’,’19th value’,’20th value’,’21st value’,’22nd value’});
export = uitable(fig,"Data",t);
orient(fig,’landscape’)
saveas(fig,’Value Averages.pdf’,’pdf’)I have a 16×23 table that I would like to export to a pdf through matlab. I have tried to turn the pdf to landscape to fit better, as well as reduce the text size. I have also tried to position it using "position" as an option in the function "uitable". I have also used the "print" function but it seems like saveas works better.
Essentially this is what I would like the output to look like (check the picture attached), but I want matlab to export and position it automatically after it runs. It can be in data form or table form.
Here is my current code:
fig = uifigure(‘Name’,’Value Averages’);
t = table([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],’VariableNames’,{‘Number of Values’,’1st value’,’2nd value’,’3rd value’,’4th value’, …
‘5th value’,’6th value’,’7th vlaue’,’8th value’,’9th value’,’10th value’,’11th value’,’12th value’,’13th value’,…
’14th value’,’15th vlaue’,’16th value’,’117th value’,’18th value’,’19th value’,’20th value’,’21st value’,’22nd value’});
export = uitable(fig,"Data",t);
orient(fig,’landscape’)
saveas(fig,’Value Averages.pdf’,’pdf’) I have a 16×23 table that I would like to export to a pdf through matlab. I have tried to turn the pdf to landscape to fit better, as well as reduce the text size. I have also tried to position it using "position" as an option in the function "uitable". I have also used the "print" function but it seems like saveas works better.
Essentially this is what I would like the output to look like (check the picture attached), but I want matlab to export and position it automatically after it runs. It can be in data form or table form.
Here is my current code:
fig = uifigure(‘Name’,’Value Averages’);
t = table([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)],[rand(16,1)], …
[rand(16,1)],[rand(16,1)],’VariableNames’,{‘Number of Values’,’1st value’,’2nd value’,’3rd value’,’4th value’, …
‘5th value’,’6th value’,’7th vlaue’,’8th value’,’9th value’,’10th value’,’11th value’,’12th value’,’13th value’,…
’14th value’,’15th vlaue’,’16th value’,’117th value’,’18th value’,’19th value’,’20th value’,’21st value’,’22nd value’});
export = uitable(fig,"Data",t);
orient(fig,’landscape’)
saveas(fig,’Value Averages.pdf’,’pdf’) export, table, figure, pdf MATLAB Answers — New Questions