MATLAB arrays support matrix operations and element operations. For example, M*N and M.*N. This is a quite intuitive way to distinguish the two di
M*N
M.*N
It's as simple (and as difficult!) as defining a function named (in this case) operator*():
operator*()
Matrix operator*(const Matrix &m1, const Matrix &m2) ...
where Matrix is a class you've defined to represent matrices.
Matrix