function progress3(msg)
reverseStr = '';


   % Do some computation here...

   % Display the progress
%    percentDone = 100 * rate;
%    msg = sprintf('Percent done: %3.1f', percentDone); %Don't forget this semicolon
 
   reverseStr = repmat(sprintf('\b'), 1, length(msg)+1);
  fprintf([reverseStr, msg]);
end