how to pass argument from c/c++ to function handle in matlab: Mexcallmatlab

1 view (last 30 days)
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?

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!