gmacfadden has asked for the wisdom of the Perl Monks concerning the following question:
#! /usr/bin/perl -wT use strict; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use CGI qw(:standard escapeHTML); use Math::MatrixReal; my $matrix1 = Math::MatrixReal->new_from_rows( [ [1, 1, 1, 2], [1, 0, 2, 3],[2,-1, 0,-1], [0, 1, 0, 1] ]); my $matrix2 = Math::MatrixReal->new_from_rows([ [2],[1],[2],[0] ]); print header (), start_html (-title => "Solve Simultaneous Equations") +; print "Solution = ", $matrix1->inverse() * $matrix2,"<br>\n"; print end_html (); exit(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Working with complex, not real number matrices
by lin0 (Curate) on Mar 14, 2007 at 21:18 UTC | |
by andye (Curate) on Mar 15, 2007 at 16:35 UTC | |
|
Re: Working with complex, not real number matrices
by jettero (Monsignor) on Mar 14, 2007 at 20:01 UTC | |
by gmacfadden (Sexton) on Mar 15, 2007 at 23:55 UTC | |
|
Re: Working with complex, not real number matrices
by Khen1950fx (Canon) on Mar 14, 2007 at 20:27 UTC | |
by rg0now (Chaplain) on Mar 15, 2007 at 22:25 UTC | |
|
Re: Working with complex, not real number matrices
by randyk (Parson) on Mar 15, 2007 at 15:05 UTC | |
by gmacfadden (Sexton) on Mar 16, 2007 at 18:03 UTC |