Oddly enough, I just looked at it the other day. The best information I have found is topics here and here , as well as this .
Basically this is considered very bad in the Matlab world ... but at the same time, nothing stops you, so you can do it - try simple examples and you will see that the changes are propagating. Just make changes to the data you receive from prhs (you do not need to return anything - since you changed the raw data, they will be reflected in a variable in the work area).
, , - Matlabs copy-on-write. format debug . a=b, , a b " " , , , pr . , y Matlab, copy-on-write , , y . mex, , , y, x .
, , , , - - , , , . , .