I want to export my Data in a Cell Array to an Excel file, as tidy as possible. I need help with my Matrices, as they are exported with Semi-Colon notation.
1 回表示 (過去 30 日間)
古いコメントを表示
I have a Cell Array of dimensions 2 by 40, and each cell contains a matrix of dimensions 3 by 3:
[3x3 double] [3x3 double] [3x3 double] ... [3x3 double]
[3x3 double] [3x3 double] [3x3 double] ... [3x3 double]
Now, I need to print this Cell Array and show it to my study group. Below is the detailed example of what I am trying to achieve.
Print should show each matrix in the cell clearly and separately, so that we can study it better, similar to this:
[1 2 3] [5 2 3]
[4 5 6] [1 2 2] ...
[7 8 9] [7 8 9]
[5 2 3] [4 5 6]
[3 5 6] [7 2 9] ...
[7 1 9] [5 2 3]
I tried converting Cell to Table, unfortunately this was untidy, as it showed each new row of matrices with semi-colons:
[1 2 3; 4 5 6; 7 8 9]
Also, I tried converting Cell to Double with:
data = [cell{1,:};cell{2,:}];
resulting in 6 by 120 double, looking like this:
1 2 3 5 2 3
4 5 6 1 2 2 ...
7 8 9 7 8 9
5 2 3 2 5 6
3 5 6 7 2 9 ...
7 1 9 5 2 3
I can export this to an Excel file, however you can see that it is still cumbersome. I can cut and paste the rows 4,5,6 and shift them below so that it looks like:
1 2 3 5 2 3
4 5 6 1 2 2 ...
7 8 9 7 8 9
5 2 3 2 5 6
3 5 6 7 2 9 ...
7 1 9 5 2 3
however I still need to divide every other 3 r̶o̶w̶s̶ columns, so that I can achieve what I want, which is very impractical:
1 2 3 5 2 3
4 5 6 1 2 2 ...
7 8 9 7 8 9
5 2 3 2 5 6
3 5 6 7 2 9 ...
7 1 9 5 2 3
I would really appreciate your help on this one. Thank you in advance.
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!