function backspace(fid,fmt,varargin)
% backspace Move cursor back according to size of fmt.
% Usage:: backspace(fid,fmt,varargin)
%
% Will move cursor back according to size of fmt.  Typically to give users
% feedback in the form of a count: 
%
%    Nc=length(sprintf('%d',Nbuf));
%    fmt=sprintf('[%%0%dd/%%0%dd]',Nc,Nc);
%    fprintf(1,fmt,0,Nbuf);
%    for n=1:Nbuf
%      < code; > 
%      backspace(1,fmt,n,Nbuf);
%      fprintf(1,fmt,n,Nbuf);
%    end
%  

% revision history:
% 02/12/01 Mark D. Shattuck <mds> backspace.m  

fprintf(fid,char(8*ones(length(sprintf(fmt,varargin{:})),1)));
