function [estimates, model] = fitfunRhoSingle(TiPo, DPrhoSingle)

TiPoNrRho = length(TiPo);

start_point(1)              = 1;                    %starting points for Rho
start_point(2)              = 1.1 * DPrhoSingle(1); %starting points for Const

model = @Karfun;

options = optimset('display', 'off');
[estimates, fval, exitflag, output] = fminsearch(model, start_point, options);

    function [sse] = Karfun(params)
       rho = (params(1));
       Const = (params(2));
            for k = 1:TiPoNrRho; %length(TiPo);
                Point(k)    = Const * exp(-rho * TiPo(k));%
                ErrorSq(k)  = (Point(k) - DPrhoSingle(k))^2;
            end

      sse = sum(ErrorSq);
    end
end
