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: spm_t2z.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8
    
    the code of the file until where you have to start completion: function [z,t1,z1] = spm_t2z(t,df,Tol)
% Students t to standard Normal (z-score) distribution
% FORMAT [z,t1] = spm_t2z(t,df,Tol);
% t   - t values 
% df  - degrees of freedom
% Tol - minimum tail probability for direct computation
%       Defaults to 10^(-16), a z of about 8.2
% t1  - (absolute) t-value where linear extrapolation starts
%       empty if no extrapolation
% z1  - Equivalent standard Normal ordinate to t-value t1
%__________________________________________________________________________
%
% spm_t2z implements a distributional transformation from the Student's
% t to the unit Gaussian using incomplete Beta functions and the
% inverse error function.
%
% Re
    
function for extrapolation, fitted such that first
% derivative is continuous. Estimate gradient from the last 0.5 (t) of
% the (computable) t2z relationship.
%===========================================================================
if any(mQb)
    z1          =-sqrt(2)*erfinv(2*Tol-1);
    t2          =t1-[1:5]/10;
    z2          =spm_t2z(t2,df);
    %-least squares line through ([f1,t2],[z1,z2]) : z = m*f + c
    mc          = [[t1,t2]',ones(length([t1,t2]),1)] \ [z1,z2]';

    %-------------------------------------------------------------------
    %-Logarithmic extrapolation
    %-------------------------------------------------------------------
    l0=1/mc(1);
    %-Perform logarithmic extrapolation, negate z for positive t-values
    QQ    = Q(mQb); % positions of t-values left to process
    z(QQ) = - ( log( (2*(t(QQ)>0)-1).*t(QQ) -t1 + l0 ) + (z1-log(l0)) );
    %-------------------------------------------------------------------

%   %-------------------------------------------------------------------
%   %-Linear extrapolation
%   %-------------------------------------------------------------------
%   %-adjust c for line through (t1,z1)
%   mc(2)       = z1-mc(1)*t1;
%
%   %-Perform extrapolation, negate positive t-values
%   QQ    = Q(mQb); % positions of t-values left to process
%   z(QQ) = - ( (2*(t(QQ)>0)-1).*t(QQ)*mc(1) + mc(2) );
%   %-------------------------------------------------------------------

end