MATLAB: Accessing handle graphics from within Fortran mexfunction

fortranhandle graphics

Can you access Matlab's handle graphics from within a Fortran mexFunction? I see that there are mexSet and mexGet functions; however, they appear to apply only for C mexFunctions.
Thanks a million, Bill

Best Answer

  • Hi Otis,
    I guess (!) the answer is yes. Handles itself are just usual doubles. Therefore you should be able to call the set and get by something like
    mxArray* pprhs[3];
    pprhs[0] = prhs[0]; // assuming prhs[0] is the handle
    pprhs[1] = mxCreateString("tag");
    pprhs[2] = mxCreateString("Bill");
    mexCallMATLAB(0, plhs, 3, pprhs, "set");
    Titus