## This function will solve the Generalized Power Law (GPL) ## and calculate (estimate) the parameters D0,D1 and m ## in the GPL model D(t) = D0 + D1*t^m ## note t = reduced time ## Author: Steph Bredenhann ## Created: 2020-03-14 function [ GPL_Y ] = fn_BBR_GPL( x, D, t); ##fprintf('fn_GPL: Entering function fn_GPL_RMSE: \n'); ##fprintf(' GPL_D0 = %9.7f \n',x(1)); ##fprintf(' GPL_D1 = %9.7f \n',x(2)); ##fprintf(' GPL_m = %9.7f \n',x(3)); ## n_max = length(D); ## fprintf('fn_GPL: n_max = %7.1f \n',n_max); D0 = x(1); D1 = x(2); m = x(3); Dcalc = fn_GPL_model(D0, D1, m, t); GPL_Y = Dcalc - D; end