フィルターのクリア

converting size of cell array to simple matrix

1 回表示 (過去 30 日間)
Marek Rousek
Marek Rousek 2015 年 12 月 30 日
コメント済み: Marek Rousek 2015 年 12 月 30 日
Hello,
I need advice. I 1x6 (or 1x8, but always 1xsometrhing) cell array, wherein each cell in the cell array always have a 3-D matrix with different sizes (figure RGB - width, height, color). I need advice on how to transform the size of the first two dimensions of the nuts inside the cell array into a simple matrix.
Example: the first cell = 3-D matrix with dimensions of 128x65x3 uint8
second cell 126x63x3 = uint8
... = 122x69x3 uint8
etc.
that the result in the form of 2-D matrix:
128 65
126 63
122 69
etc.
Thanks for the reply.

採用された回答

Walter Roberson
Walter Roberson 2015 年 12 月 30 日
cell2mat( cellfun(@(A) [size(A,1),size(A,2)], YourCellArray(:), 'Uniform', 0) )
  1 件のコメント
Marek Rousek
Marek Rousek 2015 年 12 月 30 日
Thank you very much!!!! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by