[MATLAB] Replaced octave code