%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% huffman_code.m script of web demo "Huffman Coding"                          %
%                                                                             %
% INSTITUTE OF TELECOMMUNICATIONS                                             %
% University of Stuttgart                                                     %
% www.inue-uni-stuttgart.de                                                   %
% author: Michael Bernhard (michibernhard@gmx.de)                             %
% date: 03.09.2013                                                            %
%                                                                             %
% Written for GNU Octave                                                      %
%                                                                             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function huffman_code(filename_input)
  if nargin > 0; filename = filename_input; else filename='plot.jpg'; end;
  % create a slideshow with 18 pictures
  numberOfImages = 18;

  for k=0:numberOfImages-1
    newFilename = [filename '_' num2str(k)];
    command = ['cp images/' num2str(k+1) '.png ' newFilename];
    system(command);
  end

end
