function Yhat = ratkowsky(params,X);

% p.162
% a min or a max at X = 4*(alfa/gamma)^2;
% if alfa or beta are negative, a minimum is obtained

alfa =params(1);
beta =params(2);
gamma=params(3);

% Model itself
Yhat  = alfa * (X .^beta) .* exp(-gamma*X);


% x=repmat((1:15)',36,1);
% Y=reshape(roi(roi_idx).Yraw_tr_dtr_bp_bin{c}',540,1)
% p=[6 16 1 1 6 0]
% nlinfit(x,Y,'nlin_hrf',p)
