function wr_str_file(filename, str_matrix)
% Write strings in str_matrix out to file called filename.
%  File format: one string per row of file.
%  Strings in file are ascii with no quote marks.
  % Open filename as read mode text file.
  [file_id, message] = fopen(filename,'wt')
  
  % Check for error opening file.
  if file_id < 0
    disp(message)
    return
  end
  
  % Print out rows of str_matrix as rows of text in file.
  for row_num = 1 : size(str_matrix,1)
    fprintf(file_id,'%s\n',str_matrix(row_num,:))
  end
  
  fclose(file_id);
  
  return

end

