% close old figures
close(findobj('type','figure','name','Input ASCII ART'));
close(findobj('type','figure','name','Output ASCII ART'));

% print the input figure
figure('Name', 'Input ASCII ART', 'NumberTitle', 'off', 'MenuBar', 'None','Position',[80 640 560 420]);
annotation('textbox', [0 0 1 1], 'String', inputData, 'FitBoxToText', 'on', ...
    'FontName', 'Courier','FontSize', 5, 'HorizontalAlignment', 'center', ...
    'VerticalAlignment', 'middle', 'FontWeight', 'Bold');

% print the output figure
if ~exist('outputMemoryData','var') || isempty(outputMemoryData)
    outputData = char(zeros(imageHeight,imageWidth));
else
    outputData = char(reshape(typecast(outputMemoryData,'uint32'),imageWidth,imageHeight)');
end
figure('Name', 'Output ASCII ART', 'NumberTitle', 'off', 'MenuBar', 'None','Position',[650 640 560 420]);
annotation('textbox', [0 0 1 1], 'String', outputData, 'FitBoxToText', 'on', ...
    'FontName', 'Courier','FontSize', 5, 'HorizontalAlignment', 'center', ...
    'VerticalAlignment', 'middle', 'FontWeight', 'Bold');