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: pspm_bf_spsrf_gamma.m
    path of file: ./repos/PsPM/src
    
    the code of the file until where you have to start completion: function [bs, t] = pspm_bf_spsrf_gamma(varargin)
% ● Description
%   pspm_bf_spsrf_gamma constructs a gamma probability density function for
%   scanpath speed responses with a total duration of 10 seconds and a shift
%   of (SOA - 3) seconds.
% ● Format
%   [bf p] = pspm_bf_spsrf_gamma(td,soa,p)
%   [bf p] = pspm_bf_spsrf_gamma([td,soa,p])
% ● Arguments
%     td: time resolution in second
%   p(1): A
%   p(2): x0
%   p(3): a

    
function [bs, t] = pspm_bf_spsrf_gamma(varargin)
% ● Description
%   pspm_bf_spsrf_gamma constructs a gamma probability density function for
%   scanpath speed responses with a total duration of 10 seconds and a shift
%   of (SOA - 3) seconds.
% ● Format
%   [bf p] = pspm_bf_spsrf_gamma(td,soa,p)
%   [bf p] = pspm_bf_spsrf_gamma([td,soa,p])
% ● Arguments
%     td: time resolution in second
%   p(1): A
%   p(2): x0
%   p(3): a
%   p(4): b
% ● Reference
%   Xia Y, Melinscak F, Bach DR (2020)
%   Saccadic Scanpath Length: An Index for Human Threat Conditioning
%   Behavioral Research Methods 53, pages 1426–1439 (2021)
%   doi: 10.3758/s13428-020-01490-5
% ● History
%   Introduced in PsPM 4.0

%% initialize
global settings
if isempty(settings), pspm_init; end