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

function result = MyFun2(x)

result = zeros(size(x));

index = (x>1)&(x<4);

result(index) = (x(index)-1).^2.*(x(index)-4).^2;
result = result/max(result(:));
