function emirpdisplay(X)
% display an emirp number, dropping out the zero digits in the middle
% 

% Get the digits as a character string
DX = char(X);
nDX = numel(DX);

% Find the middle string of zeros. It will be by far the longest string of
% zeros. So BX is true for non-zeros.
BX = DX ~= '0';

startloc = strfind(char(BX+'0'),'10');
endloc = strfind(char(BX+'0'),'01');

% what is the longest string of zeros?
zlen = endloc - startloc;
[zlen,ind] = max(zlen);
startloc = startloc(ind);
endloc = endloc(ind);

% If the zero string is at least 50 zeros in length, then zap away most of
% them. If not, then just return the entire number.
if zlen > 50
  nrem = zlen - 10;
  cDX = [DX(1:(startloc + 5)) ,'... (',num2str(nrem),' zeros redacted) ...', DX((endloc-4):end)];
else
  cDX = DX;
end

% get the name of the variable as it was passed in
Xname = inputname(1);

disp([Xname,' ='])
disp(cDX)
disp(' ')
