Re: [Scilab-users] applying a function to each element

2017-05-10 Thread Samuel Gougeon
Le 10/05/2017 à 21:36, Erhy a écrit : in this special task it is a good practice. Generally I wished to have a similar notation as in C or java (logical) ? a : b Is there a built in function to have such conditionals ? Example: --> format(6) --> a = rand(3,4) a = 0.362 0.483 0.502

Re: [Scilab-users] applying a function to each element

2017-05-10 Thread Erhy
in this special task it is a good practice. Generally I wished to have a similar notation as in C or java (logical) ? a : b Is there a built in function to have such conditionals ? Erhy -- View this message in context: http://mailinglists.scilab.org/Scilab-users-applying-a-function-to-each

Re: [Scilab-users] applying a function to each element

2017-05-10 Thread Frieder Nikolaisen
Hello Samuel, thanks a lot. It works fine. Best regards Frieder Am 2017-05-10 13:33, schrieb sgoug...@free.fr: > Hello Frieder, > > max(A,B) does it: > --> max(A,B) > ans = > 3. > 3. > 2. > > Samuel > > - Mail original - > > Hello, > > I have to matrices: A = [ 1 ; 2 ; 2 ]

Re: [Scilab-users] applying a function to each element

2017-05-10 Thread sgougeon
Hello Frieder, max(A,B) does it: --> max(A,B) ans = 3. 3. 2. Samuel - Mail original - Hello, I have to matrices: A = [ 1 ; 2 ; 2 ] B = [ 3 ; 3 ; 1 ] I looking for get matric with having only the larger Elemtns: C = [ 3 ; 3 ; 2 ] Is there function to make to apply