Note that, it is not needed to use figure(k), you can simply use only one figure and update it every time and save.
path = pwd ;
myfolder = 'myfolder' ;
folder = mkdir([path,filesep,myfolder]) ;
path = [path,filesep,myfolder] ;
for k = 1:10