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>
In reply to Re^2: How to output matrix data from Math:;MatrixReal into a Hash or an Array
by John007
in thread How to output matrix data from Math:;MatrixReal into a Hash or an Array
by John007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |