Access Matlab classes in MEX/C-code -


i have rewrite matlab code c embedded matlab using mex once again. far, i've read tutorials , examples in how works simple data structures. (i've never done before, though consider myself experienced in both matlab , c).

so here problem:

i have given that

classdef myclass      properties           foo;           bar;           blub;           somethingelse;      end       methods            function obj = myfun(obj) % random example code                obj.foo = obj.bar;                obj.blub = 42;                = 1:length(obj.somethingelse)                     obj.somethingelse(i) = i*i;                end;           end      end end 

i want rewrite myfun mex/c-function. if pass class mex-function, how can access different properties of class?

thanks

you have following functions in mex api:

mxgetproperty , mxsetproperty

their use equivalent to:

value = pa[index].propname;  pa[index].propname = value; 

note these functions create deep copies of data. there undocumented functions work shared data.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -