John007 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Folks,
Truly appreciate if any expert can give me some advise to reverese the order of matrix output from Math:;MatrixReal variable.
use Text::CSV; use Math::MatrixReal; my $mref = [ [ 'a', 'b', 'c', 'd', 'e' ], ]; my $matrix = Math::MatrixReal->new_from_rows( $mref ); print $matrix; # this will print [ 'a', 'b', 'c', 'd', 'e' ] # I want to reverse the order inside the matrix which I need later on +to do some more operations. Appreciate the help. #Result: I want the result to be printed like below # print $matrix = [ 'e', 'd', 'c', 'b', 'a' ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reverse the order of matrix printing using Math::MatrixReal
by kennethk (Abbot) on May 16, 2014 at 15:35 UTC | |
|
Re: Reverse the order of matrix printing using Math::MatrixReal
by AppleFritter (Vicar) on May 17, 2014 at 09:18 UTC |