conactenate using a loop
- From: Lex <laux5101@xxxxxxx>
- Date: Wed, 31 Oct 2007 11:16:33 EDT
Dear all,
I would like to concatenate various matrices (365x27 or 366x27), which are stored in different files (*.dat). Files with the same name with exception of the year should be concatenated.
For this reason I used the function dir to create a list of files. If file i+1 has the same name as file i, a "1" is written to a vector(vectorX), else a "0" is written.
Finally, I would like to open the files with the same name (function dlmread), concatenate them (function cat) (and finaly store them in another file).
This is the code for the
for j=1:length(vectorX);
if vectorX(j,1)==1
NewMx(:,:)=dlmread(cat(1,files(j,1).name));
end
end
??? Subscripted assignment dimension mismatch.
Please help me. Thank you.
.
- Follow-Ups:
- Re: conactenate using a loop
- From: Lex
- Re: conactenate using a loop
- From: Diederick Niehorster
- Re: conactenate using a loop
- Prev by Date: Re: avifile function
- Next by Date: Re: morphological reconstruction along imreconstruct
- Previous by thread: Decision Tree
- Next by thread: Re: conactenate using a loop
- Index(es):