Access different elements of matrix

1 回表示 (過去 30 日間)
Gina Carts
Gina Carts 2019 年 2 月 19 日
回答済み: Adam 2019 年 2 月 19 日
I have a 4D matrix with dimensions A = [100,100,25, 9].
I want to create another matrix including only the 2,3,4,5 and 7th elements of the 4th dimension.
If I want the 2nd till the 5th I know B = A[:,:,:,2:5]. If I want to add the 7th as well how can I add it?

採用された回答

Adam
Adam 2019 年 2 月 19 日
B = A( :, :, :, [2:5, 7] );

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by