[Scilab-users] How to solve a matricial equation in scilab

Samuel Gougeon sgougeon at free.fr
Tue Dec 18 04:37:10 CET 2012


Le 17/12/2012 04:49, prateek papriwal a écrit :
>
> And what about an equation like
>
> [a 2; b 4] * [3 c; -2 d] = [5 7;-5 9]
>

-->help solve

-->A = ['a' '2' ; 'b' '4' ]
  A  =
!a  2  !
!b  4  !

-->b = string([5 7;-5 9])
  b  =
!5   7  !
!-5  9  !

-->x = solve(A,b) // such that A.x = b
  x  =
!a\(-2*(-4\5)+5)  a\(-2*(4\9)+7)  !
!-4\5             4\9             !

Now, you have to match x with  [3 c ; -2 d] ...

HTH
Samuel




More information about the users mailing list