Re: [Scilab-users] Generating a boolean vector or matrix

2019-09-04 Thread Federico Miyara
Stéphane, Questions: 1) Why does it work? 2) Is there some native function to create bolean matrices 3) If not, are there any plans to introduce functions such as true(m,n) or false(m,n)? Yes, there : https://codereview.scilab.org/#/c/19964/ S. with the following syntax:

Re: [Scilab-users] Generating a boolean vector or matrix

2019-09-04 Thread Stéphane Mottelet
Le 04/09/2019 à 09:39, Stéphane Mottelet a écrit : Hello, Le 04/09/2019 à 09:11, Federico Miyara a écrit : Dear all, I need to create a boolean vector, such as [%t, %t, %t, %t] but with a number of components given by a variable n. I couldn't find a function similar to ones(1,n).

Re: [Scilab-users] Generating a boolean vector or matrix

2019-09-04 Thread Stéphane Mottelet
Hello, Le 04/09/2019 à 09:11, Federico Miyara a écrit : Dear all, I need to create a boolean vector, such as [%t, %t, %t, %t] but with a number of components given by a variable n. I couldn't find a function similar to ones(1,n). However I've found a workaround: a = ones(1,n) & %t It

Re: [Scilab-users] Generating a boolean vector or matrix

2019-09-04 Thread Dang Ngoc Chan, Christophe
Hello, > De : Federico Miyara > Envoyé : mercredi 4 septembre 2019 09:11 > > I need to create a boolean vector, such as [%t, %t, %t, %t] […] I > couldn't find a function similar to ones(1,n). > > However I've found a workaround: > > a = ones(1,n) & %t > […] > 1) Why does it work? Because "A

[Scilab-users] Generating a boolean vector or matrix

2019-09-04 Thread Federico Miyara
Dear all, I need to create a boolean vector, such as [%t, %t, %t, %t] but with a number of components given by a variable n. I couldn't find a function similar to ones(1,n). However I've found a workaround: a = ones(1,n) & %t It shouldn't work because ones(1,n) is not boolean, but it does.