Creating a table in matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abdullah Türk
am 5 Feb. 2019
Beantwortet: Fangjun Jiang
am 5 Feb. 2019
Hello everyone,
I have a matrix as shown in the picture. Name of rows are A,B,C,D,E and names of columns are C1,C2,C3,C4,C5,C6 and C7. I want to create a table in matlab.I would like to create a table with the name of the rows and columns in the matrix. How can I do that? Thanks in advance.
![matrix.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202868/matrix.png)
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 5 Feb. 2019
Your data must be in a cell. You can do this.
t=cell2table(cell(2));
t.Properties.VariableNames={'c1','c2'}
t.Properties.RowNames={'A','B'}
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!