Multidimensional array: how to extract several dimensions at same time?

2 ビュー (過去 30 日間)
Xiaohan Du
Xiaohan Du 2017 年 7 月 3 日
コメント済み: Xiaohan Du 2017 年 7 月 3 日
Hi all,
Imagine there is a 4d array like this:
arrayA = rand(5, 4, 3, 2);
Now I need a new arrayB which contains all elements of dimension 1, 2, 4 and only first elements of dimension 3, such that the new array is:
size(arrayB)
ans =
5 4 1 2
how can I do this?

採用された回答

Stephen23
Stephen23 2017 年 7 月 3 日
編集済み: Stephen23 2017 年 7 月 3 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by