Hello Monks !

Need help on below Math::MatrixReal module

1) How to access an individual element and print it out of the final matrix <\p>

2) How to print final matrix in an Array so that I can use it later on for other purpose, printing to screen and also printing to a csv file

3) How to print final matrix in an Hash if 2D matrix so that I can print to screen and also save to CSV

Code =====

use warnings; use strict; use Net::FTP; use Math::MatrixReal; print "\n Matrix from Arrays -Printing in ROWS format\n"; my @matrix1 = ( -0.022333, -0.016800, -0.016128, -0.015456, -0.014784, -0.014112, -0.013440, -0.012768, -0.012096, -0.011424 ); my @matrix2 = ( 3.36, 3.2, 3.35, 3.45, 3.55, 3.65, 3.75, 3.85, 3.95, 2.30 ); my $matrix_final = Math::MatrixReal->new_from_rows( [ \@matrix1, \@mat +rix2 ] ); print $matrix_final; my $matrix_transpose = Math::MatrixReal->new(10,2); $matrix_transpose->transpose($matrix_final); print $matrix_transpose;

In reply to How to output matrix data from Math:;MatrixReal into a Hash or an Array by John007

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.