![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1050790/image.png)
How to create table?
4 ビュー (過去 30 日間)
古いコメントを表示
I have 3 Problems named "A", "B", "C". For each three problems, I have 4 Performance Metrics- "D", "E", "F", "G". And for each performance metrics of each problem, I have 11 datas. From these, I want to create a table like this-
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1050700/image.jpeg)
How do I do this?
0 件のコメント
採用された回答
Pratyush Swain
2022 年 6 月 30 日
編集済み: Pratyush Swain
2022 年 6 月 30 日
Hi,
One way to have this table is to assign problem name to each of its constituent problem metric.The table can take shape as follows: (I have used random values for stats)
V_table = table( ...
{'A';'A';'A';'A';'B';'B';'B';'B';'C';'C';'C';'C'}, ...
{'D';'E';'F';'G';'D';'E';'F';'G';'D';'E';'F';'G'}, ...
[0.4;0.4;70;60;4;2500;0.01;60;4;2500;0.01;60], ...
[0.4;0.4;70;60;4;2500;0.01;60;4;2500;0.01;60], ...
[0.4;0.4;70;60;4;2500;0.01;60;4;2500;0.01;60], ...
[0.4;0.4;70;60;4;2500;0.01;60;4;2500;0.01;60], ...
'VariableNames',{'Problem Name','Performance Metrics','Minimum Value','Maximum Value','Mean Value','Standard Value'})
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1050790/image.png)
For more information for creating table from files and various other functionalities you can refer here tables
I hope this helps.
0 件のコメント
その他の回答 (1 件)
Chunru
2022 年 6 月 30 日
problem =["A", "A","A","A","B","B","B","B","C","C","C","C"]';
performance = ["D","E","F","G","D","E","F","G","D","E","F","G"]';
MinVal = randn(12, 1);
T = table(problem, performance, MinVal)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!