Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#! /usr/local/bin/perl -w use strict; use Math::MatrixReal; sub INVERT_MATRIX { my $matrix =Math::MatrixReal->new_from_string(<<'MATRIX'); [ 0 1 2 ] [ 3 4 5 ] [ 6 7 8 ] MATRIX print $matrix; my $inverse = $matrix->decompose_LR->invert_LR ; print $inverse;
when I try to print inverese matrix as it was given in the book I get the following output:
% myprog [ 0.000000000000E+00 1.000000000000E+00 2.000000000000E+00 ] [ 3.000000000000E+00 4.000000000000E+00 5.000000000000E+00 ] [ 6.000000000000E+00 7.000000000000E+00 8.000000000000E+00 ] Use of uninitialized value in print at myprog line 34.
can somebody tell me what I did wrong?
by the way I do have a [ and a ] surrounding those numbers properly
this web app won't accept it in that region due to thatCode tags by Ovid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help On Inverse Matrix
by Ea (Chaplain) on Jul 18, 2001 at 12:53 UTC | |
by etj (Priest) on Jul 08, 2022 at 19:12 UTC | |
|
Re: Help On Inverese Matrix
by no_slogan (Deacon) on Jul 18, 2001 at 02:27 UTC | |
|
Re: Help On Inverese Matrix
by ariels (Curate) on Jul 18, 2001 at 09:08 UTC |