Le 30/08/2018 à 09:32, philippe a écrit :
Hi

before scilab6 there was some ambiguity between 1/B=1./B=(1.)/B  since
1. = 1 for floating point real numbers. We can see that this problem is
solved now :


--> B=1:3
  B  =

    1.   2.   3.


--> 1./B
  ans  =

    1.   0.5   0.3333333


--> 1/B
  ans  =

    0.0714286
    0.1428571
    0.2142857

but in the help page it is written that "X=A/B is the solution of X*B=A"
this false for  A=1  and B=1:3  as you can see :


--> B*(1/B)  // =1 !!!!
  ans  =

    1.


--> (1/B)*B  //  should be 1 ?
  ans  =

    0.0714286   0.1428571   0.2142857
    0.1428571   0.2857143   0.4285714
    0.2142857   0.4285714   0.6428571

but this is true for general matrix

--> A=[1 2 ; 3 4]
  A  =

    1.   2.
    3.   4.


--> B=[4 5 ; 6 7]
  B  =

    4.   5.
    6.   7.


--> B*(A/B) // sould be A ?
  ans  =

    17.5  -8.5
    25.5  -12.5


--> (A/B)*B // =A
  ans  =

    1.   2.
    3.   4.


this looks confusing ?
No.

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)

S.

Best regards,
Philippe

_______________________________________________
users mailing list
[email protected]
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

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to