Using C library, function with fucntion pointer as a parameter.
Show older comments
I want to make use of a C library in MATLAB but one of the main functions that the library requires has as a parameter a pointer function.
The library that I am using is proprietary so I can not share too much info, I'll try to explain it with a simpler library.
The reason I need the function pointer is because the library does not know how to find the square root of a number, so I need to make a function in MATLAB for finding the square root of a number, then pass a pointer to that function to the library using a function. Since other functions in the library need to know how to do the square root of a number it needs this function to be able to use the rest of the library.
Sorry about the wierd example. I hope this is clear enough. And I just wanted to know if this was possible.
Accepted Answer
More Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!