Dear Yuese Zheng,
It is most likely that the batch system can not find any files matching the required filename format from the cellstr you specified.
To me, it seems as if the code lines
a=[filepath1,1];
...
b=[filepath2,1];
might be wrong. If you wanted to construct a filename consisting of the strings filepath1 and ',1', you would have to place ,1 in single quotes. Personally, I would always use fullfile() or sprintf() functions to generate string variables instead of concatenating. It makes code more readable and can prevent many format errors.
Best,
Volkmar
|