
% Define the data sets that you are trying to fit the
% function to
X=t_low;
Y=r_low;
 
% Initialize the coefficients of the function
X0=[1 1]';
 
% Set an options file for LSQNONLIN to use the
% medium-scale algorithm
options = optimset('Largescale','off');
 
% Calculate the new coefficients using LSQNONLIN
x=lsqnonlin(@quintic_meat,X0,[],[],options,X,Y);
 
% Plot the original and experimental data
Y_new = x(1)*X.^x(2);
plot(X,Y,'+r',X,Y_new,'b')