I've used Octave and MATLAB interchangeably on the same pieces of code in the past; I've had no problems with compatibility. The main differences as far as I can tell are:
MATLAB can be byte-compiled, and is slightly faster.
MATLAB can be byte-compiled, and is slightly faster.Octave produces much better plots.
Octave can use either#
or%
for comments, Matlab only uses%
- Octave produces much better plots.