Given
Find the mean of each column, and add this mean to each element of the corresponding column. The result should be
To subtract the mean, just replace Plus with Subtract below for Mathematica and replace @plus
with @minus
for Matlab. This shows that Matlab bsxfun
is analogue to Mathematica’s MapThread.