[Scilab-users] slash (/) help page confusing ?

Stéphane Mottelet stephane.mottelet at utc.fr
Thu Aug 30 10:34:08 CEST 2018


Le 30/08/2018 à 10:22, Stéphane Mottelet a écrit :
> Le 30/08/2018 à 10:03, philippe a écrit :
>> Le 30/08/2018 à 09:42, Stéphane Mottelet a écrit :
>>> Le 30/08/2018 à 09:32, philippe a écrit :
>>>>   [...]
>>>> but in the help page it is written that "X=A/B is the solution of 
>>>> X*B=A"
>>>
>>> For square A, B, invertible B, "A/B" means "A*inv(B)", hence
>>> B*(A/B)=B*A*inv(B) cannot be equal to A (matrix product is not 
>>> commutative)
>> I know this but for non-square matrices scilab use the opposite
>> convention,
> OK. To me, the / operator does not correctly check the compatibility 
> of respective dimensions of A and B. The statements:
>
> A=1;
> B=[1 2 3];
> X=A/B
>
> should raise an error because A and B must have the same number of 
> columns if the equality X*B=A has to make sense.
>
> With the following statements
>
> A=1;
> B=[1 2 3]';
> X=A/B
> X*B
>
> we get a coherent result:
>
> --> X=A/B
>  X  =
>
>    0.   0.   0.3333333
>
> --> X*B
>  ans  =
>
>    1.
>
> S.
in Matlab, dimensions are correctly checked:

 >> 1/[1 2 3]
Error using  /
Matrix dimensions must agree.

Bug created @ http://bugzilla.scilab.org/show_bug.cgi?id=15746

S.

>> IMHO it's confusing, and the case of a scalar in the help
>> page doesn't mention this change. the help page should be updated.
>>
>> Best regards,
>>
>> Philippe
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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




More information about the users mailing list