[…] Be aware that expressions like x+y and x[,1] create temporary matrices, so don't use expressions as parameters to subroutines that modify their arguments. …