% A sample function (even)
%
% Samuli Siltanen Nov 2014

function result = MyFun3(x)

result = ones(size(x));

index = ((x>1)&(x<2))|((x>2*pi-2)&(x<2*pi-1));

result(index) = -.6;