PDL::Lib::Linear::Solve -- Linear Equations Set Solution or Matrix Inversion using Hard-Coded Routines
use PDL; use PDL::Lib::Linear::Solve; my $coeffs = pdl([[1,1],[0,1]]); my $values = pdl([[5],[2]]); my ($new_coeffs, $new_values) = linear_solve($coeffs, $values);
This package provides routines for solving a set of linear equations and inverting a matrix using hard-coded routines written in C.
Copyright (C) 2003 Shlomi Fish. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file.
linear_solve provides a solving algorithm for a set of linear equations.
linear_solve
($result_coeffs, $result_values) = linear_solve($coeffs, $values);
linear_solve accepts two arguments - a square matrix representing the linear equation coefficients, and a tensors that contains their values. As a result it produces a matrix with the final coefficients (an identity matrix if the coefficients form a regular matrix), and the final values.
Inverts a matrix
$inverted_matrix = inv($matrix);
To install , copy and paste the appropriate command in to your terminal.
cpanm
cpanm SHLOMIF/PDL-Lib-Linear-Solve-0.002.tar.gz
CPAN shell
perl -MCPAN -e shell install SHLOMIF/PDL-Lib-Linear-Solve-0.002.tar.gz
For more information on module installation, please visit the detailed CPAN module installation guide.