Hey there,
assuming I have a compiled mex file with the name ‘myMx’, is there any way to disallow direct calls to myMx()? I only want myMx() to be called out of my m-file function callMyMx() because that’s where I do additional input-arguments checking so that I don’t have to do it in the mex-file itself.
Thanks!
Hey there, assuming I have a compiled mex file with the name ‘myMx’, is
Share
To make sure that other functions cannot access
myMx, you have to make it into a private function. Briefly, you create a subdirectoryprivatein the directory in whichcallMyMxresides, and movemyMxthere. This guarantees that only functions in the directory ofcallMyMxcan seemyMx.