Remove and clear things in a table for presentation
显示 更早的评论
I have a table like this:
T = 2x3 table
percent cars cats
________ _________________ _____________________
'59%' 'hej' 'nej'
[] '42405' '26211'
I would like this to look like this
percent cars cats
________ _________________ _____________________
59% hej nej
42405 26211
Removing [] and ' '. Is there any possible way to achieve this ?
Thanks in advance
采纳的回答
更多回答(1 个)
Walter Roberson
2018-3-15
1 个投票
"Is there any possible way to achieve this"
Copy all of toolbox/matlab/datatypes/@tabular into your own directory that is earlier on the path. Modify the disp.m of your hacked version:
- change fullChar to default to true near line 30
- near line 160, change the scalar string case to not add double-quotes
- near line 320, change the quote characters to empty
- test thoroughly, because chances are that somewhere there is code that relies upon those quote marks being there
Note: You asked about "any possible way", not any practical way. If you had asked about practical ways, I would have said NO.
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!