Displaying 1 result from an estimated 1 matches for "wavefit".
Did you mean:
wavefile
2012 Aug 11
1
unsued argument
...ned function
cf<-function(L,b,pa,pb)pa/(L/b)^pb
%%A function of q, quote Pexv, Rgsq, cf
Psfcex<-function(v,L,b,pa,pb)Pexv(v,L,b)+cf(L,b,pa,pb)*b/L/15*(4+7/q^2/Rgsq(L,b)-(11+7/q^2/Rgsq(L,b))*exp(-q^2*Rgsq(L,b)))
%%non-linear fit
Pfit<-function(p)sum((I-Psfcex(p[1],p[2],p[3],p[4],p[5]))^2)
wavefit<-nlm(Pfit,c(1.5,500,5,1,0.1),hessian=TRUE)
error code: Error in c(1.5, 500, 5, 1, 0.1) : unused argument(s) (0.1)
the fifth parameter is pb, which goes from Psfcex to alpha, actually L,b and
pa in alpha are used, why not pb?
--
View this message in context: http://r.789695.n4.nabble.com/un...