how to pass argument from c/c++ to function handle in matlab: Mexcallmatlab
1 view (last 30 days)
Show older comments
I noticed this post. http://www.mathworks.com/matlabcentral/answers/96775-how-do-i-pass-function-handles-to-c-mex-function-in-matlab-7-8-r2009a
where a simple example is given:
h = @cos;
x =0.6;
y = simplefunction(h,x);
the function is evaluated through "mexCallMATLAB(1,&lhs,2,rhs,"feval")"
now I need to pass some argument to this function handle, for example:
h= @(x,a) a*cos(x), where a is supposed to be parsed from simplefunction.c
how can I do that?
0 Comments
Answers (0)
See Also
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!