how to put heading for columns of matrix?

15 次查看(过去 30 天)
I want to put a heading for each column of a output matrix like
I J K
2 3 4
4 5 4
3 8 7

回答(3 个)

Azzi Abdelmalek
Azzi Abdelmalek 2013-10-4
h={'I' 'J' 'K'}
A= [2 3 4;4 5 4;3 8 7]
M=[h;num2cell(A)]
  5 个评论
hadiqa khan
hadiqa khan 2018-4-2
the table window appears with the name figure how to name this table created by code provided by you??

请先登录,再进行评论。


Jonathan Sullivan
Jonathan Sullivan 2013-10-4
If you have MATLAB 2013b, I would look into using tables
doc table
  2 个评论
suvadip paul
suvadip paul 2013-10-5
Is there any way to get Matlab 2013b free?
Jonathan Sullivan
Jonathan Sullivan 2013-10-7
No but earlier versions of MATLAB have datasets in the statistics toolbox. They provide similar functionality.
doc dataset

请先登录,再进行评论。


anahita ahrari
anahita ahrari 2018-6-6
how can i add titles to a column in matlab ?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by