Different Behaviour matlab and octave