Dear John,
I saw that you use the Miller-Rabin algorithm to test primality. considering that are known the strong pseudoprimes to the first 9 prime bases (http://arxiv.org/pdf/1207.0063.pdf), I suggest a little implementation to speed up your Miller-Rabin algorithm:
MyFisher23
A very compact routine for Fisher's exact test on 2x3 contingency table
Author: Giuseppe Cardillo
For negative values, gammaln would return INF so that table is not added to computation. Maybe in previous version of gammaln this is not allowed and it calls error. So rows in Tables matrix with negative values must be erased before to give it to gammaln.
[I J]=find(Tables<0); Tables(I,:)=[];
will do this
03 Apr 2014
MyFisher23
A very compact routine for Fisher's exact test on 2x3 contingency table
Author: Giuseppe Cardillo
try to add this line before line 108
[I ~]=find(Tables<0); Tables(I,:)=[];
03 Apr 2014
MyFisher23
A very compact routine for Fisher's exact test on 2x3 contingency table
Author: Giuseppe Cardillo
I checked but on my pc the version is the same and the result is
why i get this error? I have two data measured, X and Y. I just put:
load x.txt
load y.txt
[cf G]=L4P(x,y) , and appears this error:
Error using fit>iFit (line 415)
NaN computed by model function, fitting cannot continue.
Try using or tightening upper and lower bounds on coefficients.
Error in fit (line 109)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
Error in L4P (line 194)
[cf G] = fit(x(ok_),y(ok_),ft_,fo_);
why i get this error? I have two data measured, X and Y. I just put:
load x.txt
load y.txt
[cf G]=L4P(x,y) , and appears this error:
Error using fit>iFit (line 415)
NaN computed by model function, fitting cannot continue.
Try using or tightening upper and lower bounds on coefficients.
Error in fit (line 109)
[fitobj, goodness, output, convmsg] = iFit( xdatain, ydatain, fittypeobj, ...
Error in L4P (line 194)
[cf G] = fit(x(ok_),y(ok_),ft_,fo_);
thanks
Nice. One issue with the verbose option: when set to 0, it doesnt fill the .co part of the output anymore. To fix, switch the lines
m=[table(CSe,1) table(CSp,1) CE table(CEff,1)];
end
near the end of the code (line 300 or so)
Comment only