how to add title/caption to FormalTable ?
23 次查看(过去 30 天)
显示 更早的评论
I want to add caption/title to the table. I am making tables using FormalTable but could not find the property to add caption to it. Please help
0 个评论
采纳的回答
Srijith Kasaragod
2021-11-23
4 个评论
Randolph Leiser
2024-12-16
编辑:Randolph Leiser
2024-12-17
This answer works if you want to do minimal formatting, but BaseTable seems to overwrite or not fully interpret the settings of a Table or FormalTable. For example if we change the style lines of your table creation to:
t.TableEntriesStyle = { ColSep("none"), ...
RowSep("none"), ...
Border("none"), ...
Width("1in")};
then executing the code yields a table with only the bottom and right border removed.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821182/image.png)
Similarly, trying dashed
t.TableEntriesStyle = { ColSep("dashed"), ...
RowSep("dashed"), ...
Border("dashed"), ...
Width("1in")};
gives this table
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1821183/image.png)
I am not sure if there is a way to maintain the formatting of the original table better, as BaseTable does not have Border properties than can be modified.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!