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: MannPicardCRF.m
    path of file: ./repos/HDR_Toolbox/source_code/Generation
    
    the code of the file until where you have to start completion: function [lin_fun, gamma_param] = MannPicardCRF(stack, stack_exposure)
%
%       [lin_fun, gamma_param] = MannPicardCRF(stack, stack_exposure)
%
%       This function computes camera response function using Mann and
%       Picard methods.
%
%        Input:
%           -stack: a stack of LDR images. If the stack is a single or
%           double values are assumed to be in [0,1].
%           -stack_exposure: an array containg the exposure time of each

    
function [lin_fun, gamma_param] = MannPicardCRF(stack, stack_exposure)
%
%       [lin_fun, gamma_param] = MannPicardCRF(stack, stack_exposure)
%
%       This function computes camera response function using Mann and
%       Picard methods.
%
%        Input:
%           -stack: a stack of LDR images. If the stack is a single or
%           double values are assumed to be in [0,1].
%           -stack_exposure: an array containg the exposure time of each
%           image. Time is expressed in second (s)
%
%        Output:
%           -lin_fun: the inverse CRF as a LUT
%           -gamma_param: the inverse CRF as parametric model:
%
%                   (x + gamma_param(1,c)).^gamma_param(2,c);
%       
%            where c is a color channel
%

if(isempty(stack))
    error('MannPicardCRF: a stack cannot be empty!');
end