[Scilab-users] qustion on functional argument

Frederic Jourdin frederic.jourdin at shom.fr
Mon Apr 20 12:09:16 CEST 2015


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




More information about the users mailing list