clc
t=[2 3 4 5 7 10 14];
y=[3330 2830 2630 2500 2330 2260 2200];
[xData, yData] = prepareCurveData( t, y );
% Set up fittype and options.
ft = fittype( 'a0+a1.*exp(-t/4)+a2.*exp(-t/1.5)+a3.*exp(-t/0.8)', 'independent', 't', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.StartPoint = [0.278498218867048 0.913375856139019 0.546881519204984 0.957506835434298];
% Fit model to data.
[fitresult, gof] = fit( xData, yData, ft, opts );
% Plot fit with data.
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, xData, yData );
legend( h, 'y vs. t', 'untitled fit 1', 'Location', 'NorthEast' );
% Label axes
xlabel( 't' );
ylabel( 'y' );
grid on