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 Exchange에서 Data 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