How to remove a column from a cell with matrices?

1 回表示 (過去 30 日間)
Elin Toper
Elin Toper 2020 年 3 月 24 日
コメント済み: Elin Toper 2020 年 3 月 25 日
Hi,
Sorry if I am expressing the question in the wrong way, but I have a 1x4076 called "y" cell with a 1x20 cell in each cell.
I am looking to extract the 20th colon in each cell.
I tried to use something a=cellfun( @(x) y(1,1), out ) but its not working. Anyone has any advice? Thanks

回答 (1 件)

Peng Li
Peng Li 2020 年 3 月 24 日
outCell = cellfun(@(x) x(:, end), inputCell, 'UniformOutput', 0) should work otherwise switch UniformOutput to 1 and try.
  1 件のコメント
Elin Toper
Elin Toper 2020 年 3 月 25 日
Its working now, thank you!

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

カテゴリ

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