Hi,
I'm not sure where the problem with the title is, because calling
title(filename(1:end-4))
should work.
Regarding the problem with 6 subplots and the loop of 10: it is not clear to me what you expect? You use subplot(3,2,i), so that the output looks like
[plot1] [plot2]
[plot3] [plot4]
[plot5] [plot6]
But your loop runs from 1 to 10. So when the loop is at 7, what do you expect to happen?
You could e.g. use subplot(4,3,i), this way you would see all 10 plots ...
Titus