Need help with extracting data from n-dimension cell matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I have a 76x102x5 cell matrix. I would like to create a single array of data from each index for n-dimensions. For example,
for k = 1:5
array = cell{1,1,k};
end
output = [ 1 2 3 4 5 ];
so its only the numbers from the same index but in different dimensions.
4 件のコメント
Walter Roberson
2014 年 3 月 11 日
What shape of data is stored in each element of the cell array? Is it certain to be consistent?
採用された回答
sd
2014 年 3 月 12 日
I don't fully understand what you are trying, but lets see if this helps you
% This is just to create cell array
ar=rand(2,2,3);
ca=mat2cell(ar,ones(1,2),ones(1,2),ones(1,3));
% Now from above cell array extract double array
da=cell2mat(ca(1,1,:));
da=da(:);
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!