replicating/copy part of Cell Array

I have Cell Array;
CA{100,5}
is there a function/syntax to copy a section of a cell array in a similar fashion to copying a matrix;
NewCA = CA{1:50, 4:5};
or do I have to cell copy using a loop.
Thanks,
AD

 採用された回答

Daniel Shub
Daniel Shub 2011 年 11 月 29 日

5 投票

What about ...
NewCA = CA(1:50, 4:5);
Not the use of () and not {}.

1 件のコメント

Scragmore
Scragmore 2011 年 11 月 29 日
Thanks,
I was {} fixated, "its cell array so must use {}".
wood for trees and all that.
AD

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

その他の回答 (1 件)

Astik Sachan
Astik Sachan 2017 年 5 月 10 日
編集済み: Astik Sachan 2017 年 5 月 10 日

1 投票

CA{100,5}; %you have
tempCA = {CA{1:50,4:5}};
NewCA = reshape(tempCA,[50,2]);
Try this!

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

製品

タグ

質問済み:

2011 年 11 月 29 日

編集済み:

2017 年 5 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by