Origin Ver. 8 and Service Release (Select Help-->About Origin): SR4 Operating System: XP
I am trying to take numerical derivatives of functions (not a dataset of points) in Origin C. I noticed that the NAG library doesn't have a function for differentiation for C (but does for Fortran). The GNU Scientific Library (GSL) does have such a function, but I cannot get it to work because, apparently, Origin C doesn't support calling external functions that return a struct type variable.
So this is what I was trying in my "ocgsl.h" file:
/* Definition of an arbitrary function with parameters */
Does Origin C (or NAG) have a differentiation function (for functions) that I just don't know about? Is there any way to overcome this limitation of calling functions that return struct type variables? Many thanks!
Could you give more details about not work, for example compiling error? Origin C doesn't support external functions that return a struct type variable, but support struct type as output variable. In your code above, gsl_function is a struct and in gsl_diff_central function it is a output variable, not a return value. So should work in Origin C.