table dispaly with char array
Show older comments
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!
Accepted Answer
More Answers (1)
Walter Roberson
on 21 Oct 2016
0 votes
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.
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!