[Scilab-users] Some details on the documentation of log(), log10(), etc.

Stéphane Mottelet stephane.mottelet at utc.fr
Sat Feb 20 17:21:41 CET 2021


Hi Frederico,

In almost all other numerical software the object defined in Scilab by 
a=zeros(3,3,3) is called an "array", m=zeros(3,3) a "matrix" and 
x=zeros(1,3) or y=zeros(3,1) "vectors", and all of them are called 
"arrays". BTW, now the "hyper" prefix sounds like when it is used in 
"hyperspace"... To me, the documentation should be revamped to always 
use "array" when the denoted object can have any number of dimensions 
and use "matrix" only when the array has to be a matrix. Concerning your 
remark about the "constant vector or constant matrix", yes, this should 
be changed by something more explicit, like "array of double". We 
already use similar terms in error messages, i.e.

"%s: Wrong type for input argument #%d: A matrix of double expected.\n"

Hence we could synchonize the uses of localized messages with the 
documentation. When I say "we" it also includes "you", Frederico. If you 
feel that Scilab could be improved by a better documentation, please 
contribute. If you need some help to start using the relevant tools 
(git, codereview) I would be glad to help you.

S.

Le 20/02/2021 à 01:29, Federico Miyara a écrit :
>
> Dear all,
>
> In an old script where I needed to apply log10 to an hyperarray I had 
> implemented it as log(A)/log(10) with a comment indicating that in 
> that version log10() didn't work for hyperarrays (unfortunately I 
> don't recall what version it was).
>
> In Version 6.1.0 it does work for hyperarrays, but the documentation 
> still says that it applies to vectors or matrices:
>
> https://help.scilab.org/docs/6.1.0/en_US/log10.html
>
> In some contexts "matrix" may be interpreted as an hyperarray or 
> hypermatrix (for instance when speaking of N-D matrices), but for 
> Scilab a matrix is formally a two-dimensional array:
>
> https://help.scilab.org/docs/6.1.0/en_US/matrices.html
>
> I think the documentation should indicate that it applies to vectors, 
> matrices and hypermatrices
>
> Another problem is regarding log(). It says that the input argument is 
> a "constant vector or constant matrix":
>
> https://help.scilab.org/docs/6.1.0/en_US/log.html
>
> However, it seems that "constant" has a specific meaning in Scilab as 
> a predefined variable:
>
> https://help.scilab.org/docs/6.1.0/en_US/section_421ab29126e21a1e1e403ee27a18fda4.html
>
> As it is worded, it seems that log() is applied to predefined 
> variables. I think it should refer more clearly to the type double (it 
> doesn't work, for instance, for integer types such as int16(2)).
>
> In the case of log2() the description of arguments is even stranger:
>
> https://help.scilab.org/docs/6.1.0/en_US/log2.html
>
> It confuses the argument section with the description, and it 
> specifies decimal numbers which isn't a recognized type.
>
> The function exp(), on the other hand, doesn't indicate an output 
> argument.
>
> I think these functions are very similar and their documentation pages 
> should be consistent with one another
>
> Regards,
>
> Federico Miyara
>
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> 	Libre de virus. www.avast.com 
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210220/04b6aa0b/attachment.htm>


More information about the users mailing list