function [fitresult, gof] = createFit(x, y)
[xData, yData] = prepareCurveData( x, y );
ft = fittype( 'a*exp(b/(x-c)^z)', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.Lower = [0 0 0 0];
opts.StartPoint = [0.001 0.952083907850712 0.7812 2];
opts.Upper = [1 Inf Inf 3];
[fitresult, gof] = fit( xData, yData, ft, opts );
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, xData, yData );
legend( h, 'y vs. x', 'untitled fit 1', 'Location', 'NorthEast', 'Interpreter', 'none' );
xlabel( 'x', 'Interpreter', 'none' );
ylabel( 'y', 'Interpreter', 'none' );
grid on
end