A couple of ways that I figured you could go: % First define the MSE function mse = @(x,y) sum(sum((x-y).^2))./numel(x); I'm a big fan of using bsxfun for things like this, but unfortunately it doesn't operate on cell arrays. So, I borrowed the singleton expansion form of the answer from...