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: dsKernel.m
    path of file: ./repos/CaImAn-MATLAB/deconvolution/oasis
    
    the code of the file until where you have to start completion: function kernel_new = dsKernel(kernel, tsub)
%% downsample/upsample the convolution kernel 
%% inputs:
%   kernel: struct variable with fields {'kernel_type', 'pars', 'nMax', 'lb', 'ub', 'bound_pars'}
%       kernel_type: string, convolution kernel type. now support {'exp',
%       'exp2', 'vector'}
%       pars: parameters for the selected kernel type
%       nMax: length of the kernel
%       lb:     lower bound for each parameter
%       ub:     upper bound for each parameter

    
function kernel_new = dsKernel(kernel, tsub)
%% downsample/upsample the convolution kernel 
%% inputs:
%   kernel: struct variable with fields {'kernel_type', 'pars', 'nMax', 'lb', 'ub', 'bound_pars'}
%       kernel_type: string, convolution kernel type. now support {'exp',
%       'exp2', 'vector'}
%       pars: parameters for the selected kernel type
%       nMax: length of the kernel
%       lb:     lower bound for each parameter
%       ub:     upper bound for each parameter
%       bound_pars: logical variable, bound the parameters or not {1, 0}
%% outputs
%   kernel: struct variable

%% Author: Pengcheng Zhou, Carnegie Mellon University, 2016

kernel_new = kernel; 
if nargin<2 || isempty(tsub)
    return;
end