

coef: get coefficients of the matrix 
SYNOPSIS: my $c = $M>coef; DESCRIPTION: This returns an reference to an array of arrays containing the coefficients of the matrix. 
clr: set all coefficients equal to a value. 
SYNOPSIS: $M>clr($n); DESCRIPTION: This sets all the coefficients of the matrix identically to $n. If $n is not given, a default of 0 is used. 
add: add two matrices 
SYNOPSIS: $P = $M>add($N); DESCRIPTION: This sets $P equal to $M + $N. 
sub: subtract two matrices 
SYNOPSIS: $P = $M>sub($N); DESCRIPTION: This sets $P equal to $M  $N. 
mul: multiply two matrices or a matrix and a vector 
SYNOPSIS: $P = $M>mul($N); DESCRIPTION: This sets $P equal to $M * $N. This method can handle matrix multiplication, when $N is a matrix, as well as matrixvector multiplication, where $N is an array reference representing a column vector. 
div: divide two matrices 
SYNOPSIS: $P = $M>div($N); DESCRIPTION: This sets $P equal to $M * ($N)^(1). 
inv: invert a matrix 
SYNOPSIS: $I = $M>inv(); DESCRIPTION: This sets $I equal to ($M)^(1). 
transp: transpose a matrix 
SYNOPSIS: $T = $M>transp(); DESCRIPTION: This sets $T equal to the transpose of $M. 
simq: solve simultaneous equations 
SYNOPSIS: my $M = Math::Cephes::Matrix>new([ [1, 2, 1], [2, 3, 1], [1, 0, 3]]); my $B = [2, 1, 10]; my $X = $M>simq($B); for (my $i=0; $i<3; $i++) { print "X[$i] is $X>[$i]\n"; } where $M is a Math::Cephes::Matrix object, $B is an input array reference, and $X is an output array reference.
DESCRIPTION: A set of N simultaneous equations may be represented in matrix form as
M X = B where M is an N x N square matrix and X and B are column vectors of length N. 
eigens: eigenvalues and eigenvectors of a real symmetric matrix 
SYNOPSIS: my $S = Math::Cephes::Matrix>new([ [1, 2, 3], [2, 2, 3], [3, 3, 4]]); my ($E, $EV1) = $S>eigens(); my $EV = $EV1>coef; for (my $i=0; $i<3; $i++) { print "For i=$i, with eigenvalue $E>[$i]\n"; my $v = []; for (my $j=0; $j<3; $j++) { $v>[$j] = $EV>[$i]>[$j]; } print "The eigenvector is @$v\n"; } where $M is a Math::Cephes::Matrix object representing a real symmetric matrix. $E is an array reference containing the eigenvalues of $M, and $EV is a Math::Cephes::Matrix object representing the eigenvalues, the ith row corresponding to the ith eigenvalue.
DESCRIPTION: If M is an N x N real symmetric matrix, and X is an N component column vector, the eigenvalue problem
M X = lambda X will in general have N solutions, with X the eigenvectors and lambda the eigenvalues. 
Please report any to Randy Kobes <randy@theoryx5.uwinnipeg.ca>
The C code for the Cephes Math Library is Copyright 1984, 1987, 1989, 2002 by Stephen L. Moshier, and is available at http://www.netlib.org/cephes/. Direct inquiries to 30 Frost Street, Cambridge, MA 02140.The perl interface is copyright 2000, 2002 by Randy Kobes. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.20.3  MATH::CEPHES::MATRIX (3)  20140131 
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.