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: ipctb_spm_smoothkern.m
    path of file: ./repos/bspm/thirdparty/MIALAB/gipc1d/ipctb_spm5_files
    
    the code of the file until where you have to start completion: function krn = spm_smoothkern(fwhm,x,t)

    
function krn = spm_smoothkern(fwhm,x,t)
% Generate a Gaussian smoothing kernel
% FORMAT krn = smoothing_kernel(fwhm,x,t)
%     fwhm - full width at half maximum
%     x    - position
%     t    - either 0 (nearest neighbour) or 1 (linear).
%            if only two arguments are passed, then a value
%            of one is assumed.
%     krn  - value of kernel at position x
%
% For smoothing images, one should really convolve a Gaussian
% with a sinc function.  For smoothing histograms, the
% kernel should be a Gaussian convolved with the histogram
% basis function used. This function returns a Gaussian
% convolved with a triangular (1st degree B-spline) basis
% function (by default). A Gaussian convolved with a hat
% function (0th degree B-spline) can also be returned.
%_______________________________________________________________________
% Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

% John Ashburner
% $Id: spm_smoothkern.m 112 2005-05-04 18:20:52Z john $


if nargin<3, t = 1; end