matlab: Unify examples and adapt to Octave callback changes