function filename=cosmo_make_temp_filename(prefix,suffix)
% give temporary filename that does not exist when this function is called
%
% filename=cosmo_make_temp_filename(prefix,suffix)
%
% Inputs:
% prefix optional, string with prefix for temporary file
% (default: '')
% suffix string [or cellstring] with suffix [suffixes] for
% temporary file [files]
% (default: '')
%
% Output:
% filename filename that does not exist when this function was
% called (in the current directory), starting with
% prefix, ending with suffix, and with a random infix
% string.
% If suffix is a cellstring, then filename is a
% cellstring with as many elements as suffix,
% each with the same prefix and random infix.
%
% Examples:
% % generate random filename
% fn=cosmo_make_temp_filename();
%
% % generate random filename starting with 'foo'
% fn=cosmo_make_temp_filename('foo');
%
% % generate random filename starting with 'foo' and ending with '.bar'
% fn=cosmo_make_temp_filename('foo','.bar');
%
% % generate two random filename, both starting with 'foo', and ending
% % with '.bar' and '.baz', respectively. The output fns is a cell with
% % two strings
% fns=cosmo_make_temp_filename('foo',{'.bar','.bar'});
%
% # For CoSMoMVPA's copyright information and license terms, #
% # see the COPYING file distributed with CoSMoMVPA. #