You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tsvread.m
    path of file: ./repos/bids-matlab/+bids/+util
    
    the code of the file until where you have to start completion: function file_content = tsvread(filename, field_to_return, hdr)
  %
  % Load text and numeric data from tab-separated-value or other file.
  %

    
function file_content = tsvread(filename, field_to_return, hdr)
  %
  % Load text and numeric data from tab-separated-value or other file.
  %
  % USAGE::
  %
  %   file_content = tsvread(filename, field_to_return, hdr)
  %
  % :param filename: filename (can be gzipped) {txt,mat,csv,tsv,json}
  % :type  filename: char
  %
  % :param field_to_return: name of field to return if data stored in a structure
  %                       [default: ``''``]; or index of column if data stored as an array
  % :type  field_to_return:
  %
  % :param hdr: detect the presence of a header row for csv/tsv [default: ``true``]
  % :type  hdr: logical
  %
  % :returns: - :file_content: corresponding data array or structure
  %
  % Based on spm_load.m from SPM12.
  %
  %

  % (C) Copyright 2018 Guillaume Flandin, Wellcome Centre for Human Neuroimaging
  %

  % (C) Copyright 2018 BIDS-MATLAB developers

  % -Check input arguments
  % --------------------------------------------------------------------------
  if nargin < 1
    error('no input file specified');
  end