info_to_save(iter, :) = [iter, fr];
However, since you know that the iterations always increase by 1 each time, you do not need to store the iteration number:
info_to_save(iter) = fr;
And afterwards:
[(1:length(info_to_save)).', info_to_save(:)]
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!