I’m trying to port a Matlab code to Java and C++.
It’s quite straightforward however I find a function that is more than simple operations, it numerically evaluates integral:
lungh=quad('normpp',0,1,[],[],x1,x2,x3,x4,x5,x6,x7,y1,y2,y3,y4,y5,y6,y7);
Here x1,...,x8 and y1,...,y7 are simple numbers.
First of all, how do this parameters are interpreted? How does this function work?
I think that 0 and 1 are the bounds of the integral…but what about the others?? Especially 'normpp' and []?
I read the quad help but I didn’t understand how it works with such an amount of parameters.
The second problem is: Do exist a java and a C++ libraries that offer these function?
I would prefer to do it directly in Java and C++ without calling Matlab.
Thanks!
In C there is a very nice library : The Gnu Scientific Library (GSL).
Here is a link to the Numerical integration page of the GSL :
GSL
The use of this library in a C++ project is straight forward.
I think the function gsl_integration_qag is a good choice to replace the matlab quad function.