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: g_Fourier.m
    path of file: ./repos/VBA-toolbox/demos/_models
    
    the code of the file until where you have to start completion: function [gx,dG_dX,dG_dPhi] = g_Fourier(Xt,Phi,ut,inG)
% Fourier basis set observation function (dummy HRF model)

    
function [gx,dG_dX,dG_dPhi] = g_Fourier(Xt,Phi,ut,inG)
% Fourier basis set observation function (dummy HRF model)

% creating the discrete cosine Fourier set
K = size(Phi,1);     % number of Fourier basis functions
p = inG.p;           % number of time bins in the fMRi time series
X = zeros(p,K);
grid = [0:p-1]';
for k = 1:K
    X(:,k) = sin(grid.*(k-1)*pi./(p-1));
end