replicating/copy part of Cell Array

조회 수: 71 (최근 30일)
Scragmore
Scragmore 2011년 11월 29일
편집: Astik Sachan 2017년 5월 10일
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일
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일
CA{100,5}; %you have
tempCA = {CA{1:50,4:5}};
NewCA = reshape(tempCA,[50,2]);
Try this!

카테고리

Help CenterFile Exchange에서 Genomics and Next Generation Sequencing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by