Hello,

I have been trying to get a simultaneous equations done, yet 

I finding errors... in how im doing it 


Im trying to do this equation  here 

              A                    b

2x'1' + 4x'2' + 3x'3'    = 4 

    x'1' - 2x'2' - 2x'3'   = 0
-3x'1' + 3x'2' + 2x'3'  = -7

this is the solution 

              [2x'1' + 4x'2' + 3x'3']   [ 4]  = [2]  = x'1'

(1/11)    [x'1' - 2x'2' - 2x'3' ]      [0]   = [-3] = x'2'

              [-3x'1' + 3x'2' + 2x'3']  [-7] = [4]   = x'3'

How should i do this in PDL ???

I tried  x = (A**-1)*b 

like this 


pdl> p $k = pdl([[2,1,-2],[4,13,7],[-3,-18,-8]]);

[
 [  2   1  -2]
 [  4  13   7]
 [ -3 -18  -8]
]


pdl> p $j = pdl([[4],[0],[7]]);

[
 [4]
 [0]
 [7]
]

so when I try to do the answer i get 


pdl> p ((1/11)*$k)*$j;

[
 [ 0.18181818 0.090909091 -0.18181818]
 [ 0.36363636   1.1818182  0.63636364]
 [-0.27272727  -1.6363636 -0.72727273]
]

can any one help me with what im doing wrong in PDL here ???

Thanks

-Mark 
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to