Thursday, June 11, 2009

saving .mat file as per the iteration

I wanted to save the mat files as the iteration progressed.
here is the quick solution:
it saves the mat file with number of iteration as the file name: viz: 100.mat, 200.mat etc.
This is handy when you want to compare the results of the intermediate results as you progress the iteration.





if rem(nn,SS/10)==0
disp(['iteration: ', num2str(nn), ' of ', num2str(SS)]);
save ([num2str(nn)])
end


No comments: