concatenate cells

12 visualizaciones (últimos 30 días)
panagiotis
panagiotis el 2 de Mzo. de 2012
for k=1:8
cd(phonemes{k});
datat{k}=dir('*.pcm');
cd ..
x=cat(1,data{k})
end
hey guys,i need some help here...well i have 8 folders each one contains 60.pcm files, i want to concatanate all in one i.e. i want to have a cell with 8x60=480 .pcm files??!! any help please????
  1 comentario
panagiotis
panagiotis el 2 de Mzo. de 2012
x doesn't works...it appears 558 files with aliasing and i don't know the reason!

Iniciar sesión para comentar.

Respuestas (2)

Jan
Jan el 2 de Mzo. de 2012
x=cat(1,data{k})
This concatenates data{k} with nothing. I suggest to concatenate the data after the loop:
for k=1:8
cd(phonemes{k});
datat{k}=dir('*.pcm');
cd ..
end
x = cat(1, data{:});

panagiotis
panagiotis el 2 de Mzo. de 2012
oops you're right!!thx a lot!!

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by