combine 3 dimensions array in cells into 1 cell

13 ビュー (過去 30 日間)
Nam
Nam 2014 年 10 月 29 日
回答済み: Nam 2014 年 10 月 29 日
Hi all, I have a 1x10 cell. Every cell contains 10x10x50 elements array. I want to combine all these data into a single array in sequence as result: 10x10x500 so that array contains cell{1,1}cell{1,2}. . . .cell{1,10} all merged in proper sequence. Please help me. Thanks you so much. NAM

採用された回答

Orion
Orion 2014 年 10 月 29 日
Hi,
just concatenate using cat
% generate a 1x10 cell, every element is a 10x10x50 array
for i = 1:10
C1{i} = i*rand(10,10,50);
end
% create a unique array by concatenating along the 3rd direction
BigArray = [];
for i = 1:10
BigArray = cat(3,BigArray,C1{i});
end

その他の回答 (1 件)

Nam
Nam 2014 年 10 月 29 日
Thanks Orion so much. It is what I need.

カテゴリ

Help Center および File ExchangeDictionaries についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by