How can I display matrix with row and colnames. |
|
I have a 2x3 matrix and cell array like below:
matrix = [1,2,3;4,5,6]
rownames = {'10A','20B'}
colnames = {'10C5D,'20C5D',20C5D'}
rownames and colnames was made from sprintf command.
When I tried to make table, it showed errors.
How can I display it in the command window?
|
Re: How can I display matrix with row and colnames. |
|
"Sungwoo Park" wrote in message
news:npvnng$41m$1@newscl01ah.mathworks.com...
> I have a 2x3 matrix and cell array like below:
>
> matrix = [1,2,3;4,5,6]
> rownames = {'10A','20B'}
> colnames = {'10C5D,'20C5D',20C5D'}
>
> rownames and colnames was made from sprintf command.
>
> When I tried to make table, it showed errors.
> How can I display it in the command window?
Convert your array into a table using ARRAY2TABLE. Specify the RowNames and
VariableNames name-value pairs.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|