Math::Matrix 0.5
Sponsored Links
Math::Matrix 0.5 Ranking & Summary
File size:
0.006 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
817
Date added:
2007-08-08
Publisher:
Ulrich Pfeifer
Math::Matrix 0.5 description
Math::Matrix can multiply and invert Matrices.
The following methods are available:
new
Constructor arguments are a list of references to arrays of the same length. The arrays are copied. The method returns undef in case of error.
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
If you call new as method, a zero filled matrix with identical deminsions is returned.
clone
You can clone a matrix by calling:
$b = $a->clone;
size
You can determine the dimensions of a matrix by calling:
($m, $n) = $a->size;
concat
Concatenates two matrices of same row count. The result is a new matrix or undef in case of error.
$b = new Math::Matrix ([rand],[rand],[rand]);
$c = $a->concat($b);
transpose
Returns the transposed matrix. This is the matrix where colums and rows of the argument matrix are swaped.
multiply
Multiplies two matrices where the length of the rows in the first matrix is the same as the length of the columns in the second matrix. Returns the product or undef in case of error.
solve
Solves a equation system given by the matrix. The number of colums must be greater than the number of rows. If variables are dependent from each other, the second and all further of the dependent coefficients are 0. This means the method can handle such systems. The method returns a matrix containing the solutions in its columns or undef in case of error.
invert
Invert a Matrix using solve.
multiply_scalar
Multiplies a matrix and a scalar resulting in a matrix of the same dimensions with each element scaled with the scalar.
$a->multiply_scalar(2); scale matrix by factor 2
add
Add two matrices of the same dimensions.
substract
Shorthand for add($other->negative)
equal
Decide if two matrices are equal. The criterion is, that each pair of elements differs less than $Math::Matrix::eps.
slice
Extract columns:
a->slice(1,3,5);
determinant
Compute the determinant of a matrix.
dot_product
Compute the dot product of two vectors.
absolute
Compute the absolute value of a vector.
normalizing
Normalize a vector.
cross_product
Compute the cross-product of vectors.
print
Prints the matrix on STDOUT. If the method has additional parameters, these are printed before the matrix is printed.
pinvert
Compute the pseudo-inverse of the matrix: ((AA)^-1)A
EXAMPLE
use Math::Matrix;
srand(time);
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
$x = new Math::Matrix ([rand,rand,rand]);
$a->print("An");
$E = $a->concat($x->transpose);
$E->print("Equation systemn");
$s = $E->solve;
$s->print("Solutions sn");
$a->multiply($s)->print("A*sn");
The following methods are available:
new
Constructor arguments are a list of references to arrays of the same length. The arrays are copied. The method returns undef in case of error.
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
If you call new as method, a zero filled matrix with identical deminsions is returned.
clone
You can clone a matrix by calling:
$b = $a->clone;
size
You can determine the dimensions of a matrix by calling:
($m, $n) = $a->size;
concat
Concatenates two matrices of same row count. The result is a new matrix or undef in case of error.
$b = new Math::Matrix ([rand],[rand],[rand]);
$c = $a->concat($b);
transpose
Returns the transposed matrix. This is the matrix where colums and rows of the argument matrix are swaped.
multiply
Multiplies two matrices where the length of the rows in the first matrix is the same as the length of the columns in the second matrix. Returns the product or undef in case of error.
solve
Solves a equation system given by the matrix. The number of colums must be greater than the number of rows. If variables are dependent from each other, the second and all further of the dependent coefficients are 0. This means the method can handle such systems. The method returns a matrix containing the solutions in its columns or undef in case of error.
invert
Invert a Matrix using solve.
multiply_scalar
Multiplies a matrix and a scalar resulting in a matrix of the same dimensions with each element scaled with the scalar.
$a->multiply_scalar(2); scale matrix by factor 2
add
Add two matrices of the same dimensions.
substract
Shorthand for add($other->negative)
equal
Decide if two matrices are equal. The criterion is, that each pair of elements differs less than $Math::Matrix::eps.
slice
Extract columns:
a->slice(1,3,5);
determinant
Compute the determinant of a matrix.
dot_product
Compute the dot product of two vectors.
absolute
Compute the absolute value of a vector.
normalizing
Normalize a vector.
cross_product
Compute the cross-product of vectors.
Prints the matrix on STDOUT. If the method has additional parameters, these are printed before the matrix is printed.
pinvert
Compute the pseudo-inverse of the matrix: ((AA)^-1)A
EXAMPLE
use Math::Matrix;
srand(time);
$a = new Math::Matrix ([rand,rand,rand],
[rand,rand,rand],
[rand,rand,rand]);
$x = new Math::Matrix ([rand,rand,rand]);
$a->print("An");
$E = $a->concat($x->transpose);
$E->print("Equation systemn");
$s = $E->solve;
$s->print("Solutions sn");
$a->multiply($s)->print("A*sn");
Math::Matrix 0.5 Screenshot
Math::Matrix 0.5 Keywords
Matrix 0.5
Matrices
In case
matrix
Math::Matrix
A-
multiply
new
invert
MathMatrix
Math::Matrix 0.5
Libraries
Programming
Bookmark Math::Matrix 0.5
Math::Matrix 0.5 Copyright
WareSeeker periodically updates pricing and software information of Math::Matrix 0.5 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Math::Matrix 0.5 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
math matrix
multiplying matrices
multiplying integers
matrix mris
math matrix mathematics
toyota matrix
multiply layouts
multiplying and dividing fractions
matrix rayne
math matrix help
multiplying fractions
matrix multiplication
in case of
matrix energetics
multiply themes
matrix ping pong
math matrix examples
pantech matrix
Related Software
Math::MatrixReal is a nifty perl module for doing just about anything you could want with an NxN matrix. Free Download
Math::Cephes::Matrix is a Perl interface to the cephes matrix routines. Free Download
Math::Zap::Matrix is a Perl module for 3*3 matrix manipulation. Free Download
Math::MatrixReal::Aug Perl module contains additional methods for Math::MatrixReal. Free Download
Math::Zap::Matrix2 is a Perl module for 2*2 matrix manipulation. Free Download
Meta Matrix Library is a modular designed collection of C libraries. Free Download
Math::Symbolic is a Perl module for symbolic calculations. Free Download
Math::Fraction is a Perl module to manipulate exact fractions. Free Download
Latest Software
Popular Software
Favourite Software