Quantcast
Channel: MATLAB Central Newsreader - tag:"table"
Viewing all articles
Browse latest Browse all 48

Re: Using array name for variables name in table

$
0
0
"MatteP" wrote in message <nbmjk5$o1r$1@newscl01ah.mathworks.com>...
> Hi everyone,
>
> Is it possible to set the name of the variables in table using a vector name. For instance I have a vector C and I want to show the elements C(99), C(100), C(101) and I'd like the table to appear as below
>
> C(99) C(100) C(101)
> -------- --------- ----------
> 0.2453 1.2562 0.4536
>
> But when I type the command:
>
> table(C(99), C(100), C(101), 'VariableNames',{'C(99)' 'C(100)' 'C(101)'})
>
> I get an error message while if I rename the variables, say
>
> table(C(99), C(100), C(101), 'VariableNames',{'C1' 'C2' 'C3'})
>
> Everything works well.
>
> Any suggestions?
>
> Thanks in advance

To help us help you, tell us what the actual error message is.

Viewing all articles
Browse latest Browse all 48

Trending Articles