how to convert single cell-elements to double?

5 ビュー (過去 30 日間)
Payjay
Payjay 2017 年 5 月 12 日
コメント済み: Payjay 2017 年 5 月 12 日
Hello everybody, I have a cell array in a cell array, with single elements, which are also from type cell. So it is pretty long-winded to do calculations with these. I would like to convert all these single-cell-elements contained in the other cell-array to a double in the cell array. Do you have any ideas?
Greets and Thanks!

採用された回答

Walter Roberson
Walter Roberson 2017 年 5 月 12 日
I lost track of how many levels of cell you have there. Perhaps
cellfun(@cell2mat, YourCellArray, 'Uniform', 0)
You might even have to...
cellfull( @(C) cellfun( @cell2mat, C, 'Uniform', 0), YourCellArray, 'Uniform', 0)
  1 件のコメント
Payjay
Payjay 2017 年 5 月 12 日
Thank you! This is great!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by