

filename = "testfile.h5";

#
# Create some test data to work with
# The will be ~3.7 gig.
#

numItems = 1000;

numbers = rand(400, 400);

data = struct( "matrix1", numbers, \
               "matrix2", numbers, \
               "matrix3", numbers, \
               "scalar1", 1, \
               "scalar2", 2 );

varString = "";

#
# I know this isn't pretty, but I want the hdf5-file to have many
# items under the root node and then 
#
# save("-hdf5", "output", "var1", "var2", ...) has to be used
#

for i=1:numItems  
  eval( sprintf("problem%06u = data;", i ) );
  varString = sprintf("%s, \"problem%06u\"", varString, i );
endfor

eval( sprintf("save(\"-hdf5\", filename %s );", varString ) );


