function a = f(s) o = rem([0 uint8(s) 0], 2) == 1; a = o(1:end-2) & o(3:end);endg = @(s) [uint8(s); f(s)];g('')g('a')g('ab')g('abc')
Standard input is empty
ans = [](1x0) ans = 97 0 ans = 97 98 0 0 ans = 97 98 99 0 1 0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!