in reply to Re: How to output matrix data from Math:;MatrixReal into a Hash or an Array
in thread How to output matrix data from Math:;MatrixReal into a Hash or an Array
Folks, Thanks for your answers. When I print a particular matrix I get following Data dumper format. This is a 5 x 5 matrix. I would like to print it to csv file like below.
where each 1,1,1,1,1 is my first column A in csv then B ...
A B C D E 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
print Dumper $matrix; $VAR1 = bless( [ [ [ '5', '4', '4', '2', '4' ], [ '9', '6', '4', '4', '3' ], [ '2', '73', '96', '6', '8' ], [ '2', '4', '9', '87', '8' ], [ '2', '4', '10', '6', '8' ], ], 5, 5 ], 'Math::MatrixReal' );
Appreciate your help if you can give me the code for this matrix printing to a output file like csv. </code>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to output matrix data from Math:;MatrixReal into a Hash or an Array
by davido (Cardinal) on May 13, 2014 at 01:56 UTC | |
by Laurent_R (Canon) on May 13, 2014 at 09:15 UTC | |
by davido (Cardinal) on May 13, 2014 at 13:58 UTC | |
by Laurent_R (Canon) on May 13, 2014 at 15:37 UTC | |
by John007 (Acolyte) on May 15, 2014 at 04:27 UTC | |
by davido (Cardinal) on May 15, 2014 at 05:22 UTC | |
|