Hi,
I tried to fit some of my data with FitWeibTAFCT and I keep getting
this:
Warning: Divide by zero.
5:Toolbox:PsychToolbox:Psychometric:FitWeibTAFC.m at line 59
In Macintosh HD:Desktop Folder:FitWeibullTAFCTest.m at line 17
This only happens for some input numbers. Below is an example of
input levels that don't work [4 5 6 7 8] and input levels that work
[1 2 3 4 5]. Does anybody know why is this happening?
Duje Tadin
% FitWeibTAFCTest
% Set up some input levels
inputs = [4 5 6 7 8]'; % THIS DOESN'T WORK
% inputs = [1 2 3 4 5]'; % THESE NUMBERS WORK JUST FINE
% Cook some data
nCorrect = [52 60 75 90 98]';
nError = 100-nCorrect;
% Do the fit
[alpha,beta,thresh] = FitWeibTAFC(inputs,nCorrect,nError);
% Compute predicted psychometric function
pInputs = 1:0.1:9;
predict = ComputeWeibTAFC(pInputs,alpha,beta);
% Make a plot
hold off
plot(inputs,nCorrect./(nCorrect+nError),'+');
hold on
plot(pInputs,predict,'
I tried to fit some of my data with FitWeibTAFCT and I keep getting
this:
Warning: Divide by zero.
> In Macintosh HD:MATLAB 5:Toolbox:optim:fminu.m at line 134In Macintosh HD:MATLAB
5:Toolbox:PsychToolbox:Psychometric:FitWeibTAFC.m at line 59
In Macintosh HD:Desktop Folder:FitWeibullTAFCTest.m at line 17
This only happens for some input numbers. Below is an example of
input levels that don't work [4 5 6 7 8] and input levels that work
[1 2 3 4 5]. Does anybody know why is this happening?
Duje Tadin
% FitWeibTAFCTest
% Set up some input levels
inputs = [4 5 6 7 8]'; % THIS DOESN'T WORK
% inputs = [1 2 3 4 5]'; % THESE NUMBERS WORK JUST FINE
% Cook some data
nCorrect = [52 60 75 90 98]';
nError = 100-nCorrect;
% Do the fit
[alpha,beta,thresh] = FitWeibTAFC(inputs,nCorrect,nError);
% Compute predicted psychometric function
pInputs = 1:0.1:9;
predict = ComputeWeibTAFC(pInputs,alpha,beta);
% Make a plot
hold off
plot(inputs,nCorrect./(nCorrect+nError),'+');
hold on
plot(pInputs,predict,'