The first point is {0,100} and that's causing the indeterminate part with Log(0). Try changing it to a very small value like 10^{-8} or so.
Hi,
I want to make a fitting curve just like '' y=A+B*Log[x^n] '' from the experimental data, but it always doesnt work...
Here it is:
data = {{0 , 100}, {0.0008, 126.992}, {0.00195, 147.187}, {0.0033, 164.79}, {0.005, 181.877}, {0.007, 198.982}, {0.01, 219.833}, {0.015, 246.441},{0.02, 278.042}, {0.027, 308.821}, {0.037, 341.473}, {0.047, 362.767}, {0.06, 379.048}, {0.08, 394.5}, {0.1, 405.422}, {0.12, 412.5}, {0.14, 415}, {0.17, 418}, {0.2, 420}, {0.24,
421}, {0.282, 422}}
model = a + b Log[x^n]
funk = FindFit[data, model, {a, b, n}, x]
and this is the warning:
FindFit::nlnum: The function value {Indeterminate, -133.123, -152.427, -169.504, -186.175, -202.944, -223.438, -249.641, -280.954, -311.433, <<11>>} is not a list of numbers with dimensions {21} at {a, b, n} = {1, 1, 1}.
I used the order to prove the data is numerical, but have no idea what the nonrectangle means...
Thanks a lot!
[IMG]file:///c:/temp/moz-screenshot-2.jpg[/IMG]
thanks to shawsend, that problem has been solved.
but I am a little dumb and here is another problem, if anybody is glad to get rid of it
model = a + b x^n
funk = FindFit[{{0, 100}, {0.0008, 126.992}, {0.00195, 147.187}, {0.0033, 164.79}, {0.005, 181.877}, {0.007, 198.982}, {0.01, 219.833}, {0.015, 246.441}, {0.02, 278.042}, {0.027, 308.821}, {0.037, 341.473}, {0.047, 362.767}, {0.06, 379.048}, {0.08, 394.5}, {0.1, 405.422}, {0.12, 412.5}, {0.14, 415}, {0.17, 418}, {0.2, 420}, {0.24, 421}, {0.282, 422}}, model, {a, b, n}, x]
the warning shows:
FindFit::njnum: The Jacobian is not a matrix of numbers at {a, b, n} = {1., 1., 1.}.
if the value of n is given, e.g. n=0.1, I can get results( like a -> -41.9803, b -> 506.786), but the result is not good enough, even I try all the kinds of value of n (from o.o1 to o.3). so maybe let the software choose the value of parameter itself is the best way. but now the problem is about Jacobian, is something to do correct it ?
Thanks again