Dear all,
I'm fitting Yes/No response data in a detection task with a Weibull function. I have seven levels of signal strength, number of Yes and No responses for each signal level that I pass to FitWeibYN as shown below. I don't understand what's wrong. I'm doing a lot of these fits. Until now I could "patch" the errored fits with NaNs, but it's becoming annoying... Please let me know if you know what it is!
Thanks a lot,
Max
S = [0.0275
0.0588
0.0667
0.0784
0.0902
0.1020
0.2275 ];
Y = [0
0
3
2
5
7
35 ];
N = [44
38
38
38
35
36
11];
FitWeibYN(S,Y,N)
??? Error using ==> roots at 28
Input to ROOTS must not contain NaN or Inf.
Error in ==> lineSearch>globalMinimizerOfPolyInInterval at 305
stationaryPoint = roots([3*coeff(1) 2*coeff(2) coeff(3)]);
Error in ==> lineSearch>pickAlphaWithinInterval at 280
z = globalMinimizerOfPolyInInterval(zlb,zub,coeff);
Error in ==> lineSearch>sectioningPhase at 194
alpha = pickAlphaWithinInterval(brcktEndpntA,brcktEndpntB,a,b,f_a,fPrime_a,f_b,fPrime_b);
Error in ==> lineSearch at 56
[alpha,f_alpha,grad,exitflag,funcCount] = sectioningPhase(funfcn, ...
Error in ==> fminusub at 216
[alpha,f,grad,exitflagLnSrch,funcCountLnSrch] = ...
Error in ==> fminunc at 367
[x,FVAL,GRAD,HESSIAN,EXITFLAG,OUTPUT] = fminusub(funfcn,x, ...
Error in ==> FitWeibYN at 63
x1 = fminunc('WeibYNFitFun',x0,options,inputs,nYes,nNo);
I'm fitting Yes/No response data in a detection task with a Weibull function. I have seven levels of signal strength, number of Yes and No responses for each signal level that I pass to FitWeibYN as shown below. I don't understand what's wrong. I'm doing a lot of these fits. Until now I could "patch" the errored fits with NaNs, but it's becoming annoying... Please let me know if you know what it is!
Thanks a lot,
Max
S = [0.0275
0.0588
0.0667
0.0784
0.0902
0.1020
0.2275 ];
Y = [0
0
3
2
5
7
35 ];
N = [44
38
38
38
35
36
11];
FitWeibYN(S,Y,N)
??? Error using ==> roots at 28
Input to ROOTS must not contain NaN or Inf.
Error in ==> lineSearch>globalMinimizerOfPolyInInterval at 305
stationaryPoint = roots([3*coeff(1) 2*coeff(2) coeff(3)]);
Error in ==> lineSearch>pickAlphaWithinInterval at 280
z = globalMinimizerOfPolyInInterval(zlb,zub,coeff);
Error in ==> lineSearch>sectioningPhase at 194
alpha = pickAlphaWithinInterval(brcktEndpntA,brcktEndpntB,a,b,f_a,fPrime_a,f_b,fPrime_b);
Error in ==> lineSearch at 56
[alpha,f_alpha,grad,exitflag,funcCount] = sectioningPhase(funfcn, ...
Error in ==> fminusub at 216
[alpha,f,grad,exitflagLnSrch,funcCountLnSrch] = ...
Error in ==> fminunc at 367
[x,FVAL,GRAD,HESSIAN,EXITFLAG,OUTPUT] = fminusub(funfcn,x, ...
Error in ==> FitWeibYN at 63
x1 = fminunc('WeibYNFitFun',x0,options,inputs,nYes,nNo);