Squeeze fx for cell arrays?

21 ビュー (過去 30 日間)
Darin McCoy
Darin McCoy 2011 年 10 月 6 日
I have a cell array
temp_data <4x1 cell>
that contains
<1x3> cell
<1x3> cell
<1x3> cell
<1x3> cell
so - what i want is
temp_data <4x3 cell>
I would like to use 1-2 functions instead of a for loop. Any ideas? i tried squeeze but it doesnt work. Each individual cell contains a string of variable length.
This is what i get when i use cell2mat
??? Error using ==> cell2mat at 53 Cannot support cell arrays containing cell arrays or objects.

採用された回答

Laura Proctor
Laura Proctor 2011 年 10 月 6 日
temp_data = [ tempdata{:} ];
temp_data = reshape(temp_data,4,3)';
  1 件のコメント
Darin McCoy
Darin McCoy 2011 年 10 月 6 日
nice!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by