Modify MatLab code to generate all files.
General utility function for logging a vector.