replicating/copy part of Cell Array

99 visualizaciones (últimos 30 días)
Scragmore
Scragmore el 29 de Nov. de 2011
Editada: Astik Sachan el 10 de Mayo de 2017
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

Respuesta aceptada

Daniel Shub
Daniel Shub el 29 de Nov. de 2011
What about ...
NewCA = CA(1:50, 4:5);
Not the use of () and not {}.
  1 comentario
Scragmore
Scragmore el 29 de Nov. de 2011
Thanks,
I was {} fixated, "its cell array so must use {}".
wood for trees and all that.
AD

Iniciar sesión para comentar.

Más respuestas (1)

Astik Sachan
Astik Sachan el 10 de Mayo de 2017
Editada: Astik Sachan el 10 de Mayo de 2017
CA{100,5}; %you have
tempCA = {CA{1:50,4:5}};
NewCA = reshape(tempCA,[50,2]);
Try this!

Categorías

Más información sobre Genomics and Next Generation Sequencing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by