concatenate cells

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

panagiotis
panagiotis 2012년 3월 2일
x doesn't works...it appears 558 files with aliasing and i don't know the reason!

댓글을 달려면 로그인하십시오.

답변 (2개)

Jan
Jan 2012년 3월 2일

1 개 추천

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 2012년 3월 2일

0 개 추천

oops you're right!!thx a lot!!

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2012년 3월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by