[Scilab-users] Generating a boolean vector or matrix
stephane.mottelet at utc.fr
stephane.mottelet at utc.fr
Thu Sep 5 10:00:34 CEST 2019
When I say ineficient, I mean that kind of behavior:
--> tic;repmat(uint8(0),10000,10000);toc
ans =
1.622535
compared to proposed implementation:
--> tic;a=zeros(10000,10000,"uint8");toc
ans =
0.063472
S.
Quoting Stéphane Mottelet <stephane.mottelet at utc.fr>:
> Le 05/09/2019 à 08:55, Lamy Alain a écrit :
>
>> Hi,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I’m not convinced the new syntax: ones(n, m, “boolean”) is a
>> good idea or is necessary because it makes “integer” (“constant”)
>> and “boolean” 2 identical types.
>
> Sorry Alain can you explain it further ?
>
>>
>>
>>
>>
>> There is a simple way to do the same :
>>
>>
>>
>> repmat(%t, n, m)
>
> Yeah, there are many other (ineficient) ways, but the average user
> would appreciate to have one and only one function (here "zeros") to
> initialize a matrix regardless is type.
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Alain
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________ users mailing
>> list
>> users at lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users[1]
>
> -- Stéphane Mottelet Ingénieur de recherche EA 4297 Transformations
> Intégrées de la Matière Renouvelable Département Génie des Procédés
> Industriels Sorbonne Universités - Université de Technologie de
> Compiègne CS 60319, 60203 Compiègne cedex Tel : +33(0)344234688
> http://www.utc.fr/~mottelet[2]
Links:
------
[1]
https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
[2]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190905/63591153/attachment.htm>
More information about the users
mailing list