I have matrix and need to subtract another matrix element by element on each row. Something like this:
$$ \begin{pmatrix} x_{1} & x_{2}\\ x_{3} & x_{4}\\ \vdots & \vdots\\ x_{n-1} & x_{n}\\ \end{pmatrix} - \begin{pmatrix} y_{1} & y_{2}\\ \end{pmatrix} $$
So end result should be something like:
$$ \begin{pmatrix} x_{1} - y_{1} & x_{2} - y_{2}\\ x_{3} - y_{1} & x_{4} - y_{2}\\ \vdots & \vdots\\ x_{n-1} - y_{1} & x_{n} - y_{2}\\ \end{pmatrix} $$
How to do this? How to do this in Octave, Matlab?
Sorry for noob question. Also would be very kind if you pint me where to read about this.