in reply to matrix multiplication
Hi etheral,
A slightly less involved solution may be trying Math::Matrix instead.
#!/perl use strict; use warnings; use diagnostics; use Math::Matrix; my $x = new Math::Matrix ( [ 3, 2, 3 ], [ 5, 9, 8 ], ); my $y = new Math::Matrix ( [ 4, 7 ], [ 9, 3 ], [ 8, 1 ], ); my $z = $x->multiply($y); print "$z\n"; __END__ 54.00000 30.00000 165.00000 70.00000
|
|---|