----- Original Message -----
From: "MARK BAKER"
Hey all,
does any one in the development have any idea on if
it would be possible to add functionality like this to PDL
p $k = pdl([[ 1x+2y+3z=27], [3x+2z+1y=27],[2x+1z+3x=27]]);
The last one should be 2x + 1z + 3y = 27.
x = 5
y = 6
z = 10
does any one think this might be possible;
it would make simultaneous equations a snap ...
or can someone point me to the source module so I can play with it..
I don't know if it helps, but Math::Matrix already provides a solution to
the example you gave, though you do need to specify the x,y,z co-ordinates
in the same order:
######################
use warnings;
use Math::Matrix;
my $p = Math::Matrix->new
(
[1,2,3,47],
[3,1,2,41],
[2,3,1,38],
);
print Math::Matrix::solve($p);
######################
it outputs:
5.00000
6.00000
10.00000
Perhaps there's something to be gained by looking at how it achieves that.
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl