function dfdp = lipomodeldfdp(X,par)


p=length(par);
n=length(X);

if p==1
    par=[100,par];
end
    
dfdp=zeros(n,p);
% note that the following column computation will be eliminated if there is only 1 parameter
% considered

dfdp(:,1) =             exp(-par(2)*X);
dfdp(:,p) =  -X.*par(1).*exp(-par(2)*X);    