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: np_readdata.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/external/fieldtrip/fileio/private
    
    the code of the file until where you have to start completion: function [np_data] = np_readdata (filename, np_info, idx_begin, data_length, option)
%
% function [np_data] = np_readdata (filename, idx_begin, data_length, option)
%
% np_readdata reads data from a NEURO PRAX data file (*.EEG).
%
%
% Syntax:
%
%   [np_data] = np_readdata(filename,idx_begin,data_length,'samples');
%   [np_data] = np_readdata(filename,idx_begin,data_length,'time');
%
% Input data:
%
%   filename    -   the complete filename with path
%                   (e. g.  C:\Document...\20030716103637.EEG)
%   idx_begin   -   the start index of the data block to be read
%   data_length -   the length of the data block to be read
%   option      -   if option = 'samples':
%                       the data block starts at sample 'idx_begin' from the recording;
%                       data_length is the number of samples to be read
%                   if option = 'time':
%                       the data block starts at time 'idx_begin' from the recording;
%                       data_length is the number of seconds to be read
%
%                   To read all data use: idx_start = 0, data_length = inf, option =
%                   'samples'.
%
% Output data:
%
%   np_data     -   structure
%      np_data.data     -   data matrix of unipolar raw data
%                           dimension of the matrix: (NxK)
%                           N: number of samples
%                           K: number of channels (each column is one channel)
%      np_data.t        -   discrete time vector for the recording
%
% Version:  1.2. (2005-02-02)
%
% See also: np_readfileinfo, np_readmarker

    
function [np_data] = np_readdata (filename, np_info, idx_begin, data_length, option)
%
% function [np_data] = np_readdata (filename, idx_begin, data_length, option)
%
% np_readdata reads data from a NEURO PRAX data file (*.EEG).
%
%
% Syntax:
%
%   [np_data] = np_readdata(filename,idx_begin,data_length,'samples');
%   [np_data] = np_readdata(filename,idx_begin,data_length,'time');
%
% Input data:
%
%   filename    -   the complete filename with path
%                   (e. g.  C:\Document...\20030716103637.EEG)
%   idx_begin   -   the start index of the data block to be read
%   data_length -   the length of the data block to be read
%   option      -   if option = 'samples':
%                       the data block starts at sample 'idx_begin' from the recording;
%                       data_length is the number of samples to be read
%                   if option = 'time':
%                       the data block starts at time 'idx_begin' from the recording;
%                       data_length is the number of seconds to be read
%
%                   To read all data use: idx_start = 0, data_length = inf, option =
%                   'samples'.
%
% Output data:
%
%   np_data     -   structure
%      np_data.data     -   data matrix of unipolar raw data
%                           dimension of the matrix: (NxK)
%                           N: number of samples
%                           K: number of channels (each column is one channel)
%      np_data.t        -   discrete time vector for the recording
%
% Version:  1.2. (2005-02-02)
%
% See also: np_readfileinfo, np_readmarker
%
% eldith GmbH
% Gustav-Kirchhoff-Str. 5
% D-98693 Ilmenau
% Germany
% 02.02.2005

% Daten initialisieren, Startsamples und Blockl‰nge ermitteln
if (0==idx_begin) && (inf==data_length)
    N_start=0;
    N = np_info.N;                 
else
    switch upper(option)
        case 'SAMPLES', 
            N_start = idx_begin;
            N       = data_length;
        case 'TIME',
            N_start = round(idx_begin*np_info.fa);
            N       = round(data_length*np_info.fa);
        otherwise,
            error ('Bad specification for ''option''');
    end