lim83
08-28-2010, 12:54 AM
hi,
i am a basic user of c, and am totally new to numerical recipes. i hope to get some help with the routine amoeba.c.
i have read through the routine outlined on pp411-412 of the 2nd edition, but i do not really understand how i can implement it in my own code, with my own model function. can someone pls show me how i can call amoeba.c (and the related amotry.c) to work on my model function:
y(x) = A exp(x^2) + B cos(Cx) + D ln(x)
where A-D are model parameters to be optimized? i have 8 experimental data points that i would like to fit the model against, and these are, say, (x1, y1), (x2,y2)...(x8,y8).
thanks in advance, and apologies for this very basic question.
i am a basic user of c, and am totally new to numerical recipes. i hope to get some help with the routine amoeba.c.
i have read through the routine outlined on pp411-412 of the 2nd edition, but i do not really understand how i can implement it in my own code, with my own model function. can someone pls show me how i can call amoeba.c (and the related amotry.c) to work on my model function:
y(x) = A exp(x^2) + B cos(Cx) + D ln(x)
where A-D are model parameters to be optimized? i have 8 experimental data points that i would like to fit the model against, and these are, say, (x1, y1), (x2,y2)...(x8,y8).
thanks in advance, and apologies for this very basic question.