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_ncTpdf.m
    path of file: ./repos/spm
    
    the code of the file until where you have to start completion: function f = spm_ncTpdf(x,v,d)
% Probability Density Function (PDF) of non-central t-distribution
% FORMAT f = spm_ncTpdf(x,v,d)
% x - t-ordinates
% v - degrees of freedom (v>0, non-integer d.f. accepted)
% d - non-centrality parameter
% f - PDF of non-central t-distribution with v degrees of freedom (df) and
%     non-centrality parameter d at points x
%__________________________________________________________________________
%
% spm_ncTpdf implements the Probability Density Function of non-central 
% t-distributions.
%
% References:
% https://en.wikipedia.org/wiki/Noncentral_t-distribution

    
function f = spm_ncTpdf(x,v,d)
% Probability Density Function (PDF) of non-central t-distribution
% FORMAT f = spm_ncTpdf(x,v,d)
% x - t-ordinates
% v - degrees of freedom (v>0, non-integer d.f. accepted)
% d - non-centrality parameter
% f - PDF of non-central t-distribution with v degrees of freedom (df) and
%     non-centrality parameter d at points x
%__________________________________________________________________________
%
% spm_ncTpdf implements the Probability Density Function of non-central 
% t-distributions.
%
% References:
% https://en.wikipedia.org/wiki/Noncentral_t-distribution
%__________________________________________________________________________

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


%-Format arguments, note & check sizes
%--------------------------------------------------------------------------
ad = [ndims(x);ndims(v);ndims(d)];
rd = max(ad);
as = [[size(x),ones(1,rd-ad(1))];...
      [size(v),ones(1,rd-ad(2))];...
      [size(d),ones(1,rd-ad(3))];];
rs = max(as);
xa = prod(as,2)>1;
if all(xa) && any(any(diff(as(xa,:)),1))
    error('Non-scalar arguments must match in size.');
end