Hi All,
I have a question. I need to add 3 matrices of size 2000 x 2000. (i.e) 2000 rows and 2000 columns using Perl::PDL module. I used the following perl script
#!/usr/bin/perl -w
use strict;
use warnings;
use PDL;
use PDL::Matrix;
if ( @ARGV != 3 ) {
die 'Two matrix files are required as arguments';
}
my $index = 0;
my @matrices;
while (<>) {
push @{ $matrices[$index] }, [ split /\s+/ ];
}
continue { $index++ if eof }
my $matrix_1 = PDL::Matrix->pdl( @{ $matrices[0] } );
my $matrix_2 = PDL::Matrix->pdl( @{ $matrices[1] } );
my $matrix_3 = PDL::Matrix->pdl( @{ $matrices[2] } );
print $matrix_1 + $matrix_2 + $matrix_3;
but I got - "TOO LONG TO PRINT" - in the output.
Can anyone help me, how to solve this problem?
Your replies are highly appreciated.
Warm regards
Fredrick.