I suggest something like this: function b=g(x) b = 1/x k = find( x>1) b( k)= x( k) + 1 endfunction Fred Le 19/04/2015 17:57, fujimoto2005 a écrit : > function b=g(x) if x>1 then > b=x+1 > else > b=1/x > end