I need to find an equivalent for MATLAB function "quadgk" in C++. I am aware of ALGLIB "autogk subpackage", but it seems so complicated to me and for some reason I was not able to use it. More precisely, my understanding is that the code is designed for a non parametric function (e.g. y = exp(x)), see Example: http://www.alglib.net/translator/man/manual.cpp.html#example_autogk_d1
However, my function is more sophisticated and has several parameters that I need to update before each use of the function. These parameters need to be passed to "void int_function_1_func" as arguments, while this requires many other changes in the code.
In the attached file "Code.cpp", one can notice that I need four parameters t1, t2, t3, and t4 to define my function "y".
Any idea how I can come up with a solution?
Thanks in advance.
Attachments: |
Code.h [463 Bytes]
Downloaded 891 times
|
Code.cpp [1.02 KiB]
Downloaded 896 times
|
|