cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Genfit in C++

ArunKannath
1-Visitor

Genfit in C++

Hi,

I have been using the genfit function in Mathcad for some non-linear curve fit and it works perfectly well. However, I would like to implement the same in C++. Can anyone tell me how I go about it? I tried an open source C++ version of the genfit (Levenberg-Marquardt method) algorithm but the results were'nt as good as what I got in mathcad.I would really appreciate if some one could point me towards an exact implementation of the mathcad genfit algorithm in C++. Thanks in advance for the help.

Arun

3 REPLIES 3
RichardJ
19-Tanzanite
(To:ArunKannath)

The results weren't as good in what way? How much different were they?

RichardJ
19-Tanzanite
(To:ArunKannath)

It's covered in Numerical Recipies:

http://www.nr.com/

You can get the C version for free, but would have to pay for the C++ version.

Thanks a lot Richard for your quick reply, What I meant by poor results was the fit wasnt anywhere as good as what I got with Mathcad. But i found out the problem. The target integration error was set to a very low value which resulted in a very poor fit:). Its working fine now. Thanks for the link to the NR website as well.

Regards

Arun

Announcements

Top Tags