Yes, you need to use .^ and ./ instead of ^ and / because at least one of the operands is not a scalar. If at least one of the operands is not a scalar, then ^ and / would be matrix algebra operations instead of element-wise operations (which is not what you want in this case).
The vector vs 2D (or nD) matrix thing really does not matter here ... both would cause matrix algebra operations to take place for ^ and / (rather than element-size for .^ and ./)
Best Answer