In subtraction, there is an example of subtract mean from matrix: A - mean(A) and it works well. But I have a matrix A of 15X1000, and I want to subtract the mean mean(A, 2) along the 1000 columns, how to do that? Thanks Jennifer
+1, but note that this requires a recent release. I think that capability was introduced in R2017a. Otherwise, you will need to use a tool like repmat or bsxfun. It is clear that JFz has a sufficiently recent release, but others might see the post and expect it to work in an old release.