gmacfadden has asked for the wisdom of the Perl Monks concerning the following question:
#! /usr/bin/perl -w use strict; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use CGI qw(:standard escapeHTML); use PDL; use PDL::Complex; my $matrixM = pdl [ [ 1+1*i, 2+1*i],[ 1-2*i, 2-1*i] ]; my $matrixB = pdl [ 5+8*i, 10-5*i ]; my $matrixX = pdl [ ]; print header (), start_html (-title => "Matrix Ops"); print "<H1><center>Via Perl Data Language</center></H1><br>\n"; print "\$matrixM = ", $matrixM,"<br>\n"; print "determinant of \$matrixM = ",$matrixM->det,"<br>\n"; print "inverse of \$matrixM = ",$matrixM->det,"<br>\n"; print "\$matrixB = ", $matrixB,"<br>\n"; print "\$matrixX = ", $matrixM->inv x $matrixB,"<br>\n"; print end_html (); exit(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PDL works for real number matrix operations, but not working for complex number matrix operations.
by Anno (Deacon) on Mar 17, 2007 at 22:14 UTC | |
by gmacfadden (Sexton) on Mar 19, 2007 at 19:20 UTC | |
by Anno (Deacon) on Mar 19, 2007 at 21:58 UTC | |
by Anno (Deacon) on Mar 20, 2007 at 21:48 UTC | |
by gmacfadden (Sexton) on Mar 21, 2007 at 17:00 UTC | |
by etj (Priest) on Jun 21, 2022 at 17:44 UTC |