Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Script p.pl
- use feature qw(say);
- use strict;
- use warnings;
- use PDL;
- my $m = pdl [[0,0,1,0],[0,0,1,0],[1,1,0,1],[0,0,1,0]];
- my $m2 = $m x $m;
- print $m2;
- -----------------
- Output:
- $ perl p.pl
- [
- [1 1 0 1]
- [1 1 0 1]
- [0 0 3 0]
- [1 1 0 1]
- ]
Add Comment
Please, Sign In to add comment