How to convert 4D double matrix into 2D arrays
8 ビュー (過去 30 日間)
古いコメントを表示
Hi
I'm sorry for my English :(
I'm trying to convert 4-D double matrix into 2D arrays
There are a total of 14 different scenarios, each represented by a matrix of size 1x101 in the program. The representation in 4D is structured as (:,:,1,1) through (:,:,101,1) for the first scenario, (:,:,1,2) through (:,:,101,2) for the second scenario, and so on, up to (:,:,1,14) through (:,:,101,14) for the fourteenth scenario. Each set of indices within the 4D structure corresponds to a unique value in the respective scenario.
Thank you so much
8 件のコメント
Dyuman Joshi
2023 年 11 月 13 日
Yes, that's what I meant.
Ok, there are 2 singleton dimensions.
Now, What is the output you want? A 101x14 array?
採用された回答
Dyuman Joshi
2023 年 11 月 13 日
10 件のコメント
Dyuman Joshi
2023 年 11 月 15 日
You are welcome!
Yes, they are the same.
For the second one, I have just combined all the steps in one command.
Yes, 'squeeze' removes all the singleton dimensions of an array.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
