table dispaly with char array
显示 更早的评论
Got the below code, not sure why the table display of the char array is not right
Tval = table(name, x_t, tvals, 'VariableNames',{'Fund','Allocation','Dollar_Value'})
Tval =
Fund Allocation Dollar_Value
____ __________ ____________
BHP 0.22894 [1x11 char]
NAB 0.19151 [1x11 char]
CSR 0.38988 [1x11 char]
AGL 0.13727 [1x11 char]
NCP 0.052397 [1x11 char]
Tval.Dollar_Value
ans = $22894412.3
$19150910.7
$38988264.5
$13726664.3
$5239748.2
How to get the strings to display? Thanks!
采纳的回答
更多回答(1 个)
Walter Roberson
2016-10-21
0 个投票
When displaying cells or struct or tables containing strings or arrays of numbers, MATLAB summarizes if it does not think that the display will easily fit.
My investigation a month or so ago found that the point at which it started summarizing depended on the width of the command output window, so if you make your window wider you might get more characters displayed.
类别
在 帮助中心 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!