Concerning lazy copying: Will Matlab ever copy data passed to a mexFunction, which modifies it?
For instance in
myMex(input1(:,:,ii), input2(:,:,ii))
can one be sure, that the input matrices are never copied, so that one can pass something in and modify it, without having to return a reference?