PHP Classes

File: cmd.php

Recommend this page to a friend!
  Classes of Ricardo Gamba  >  Matrix algebra  >  cmd.php  >  Download  
File: cmd.php
Role: Auxiliary script
Content type: text/plain
Description: Command line exe
Class: Matrix algebra
Perform operations with matrices
Author: By
Last change:
Date: 7 years ago
Size: 1,720 bytes


Class file image Download
$Mat=new Matrix();
$cmd=str_replace("help",'echo $help',$cmd);
$cmd=str_replace("autor",'echo $author',$cmd);
>> Created by Ricardo Gamba, 2008

mat.create(): Matrix creation function
    Args: matrix [string] Formato: \'[1 2 3;4 5 6]\'
mat.sum(a,b): Matrix sum function
    Args: matrix a, matriz o numero b
mat.subs(a,b): Matriz substraction function
    Args: matrix a, matriz o numero b
mat.mult(a,b): Matrix multiplication function
    Args: matrix a, matriz b

mat.dmult(a,b): Direct multiplication (NOTE: Is NOT algebraic matrix multiplication)
    Args: matrix a, matriz o numero b
mat.det(a): Calculates the determinant of a matrix
    Args: matrix a
mat.solve(a): Solve the matrix using the Gauss Jordan reduction algorythm
    Args: augmented matrix a
mat.decimals(num): Establish decimal precision

mat.plot(a,texto): Print the matrix on a readable way
    Args: a matrix, text = title text (caption)

mat.I(num): Create an identity matrix
    Args: n x m array or integer
mat.add(a,b): Add the b matrix to the a matrix (matrix glue)
    Args: a, matrix to be augmented. b : matrix to be appended
    Note: the matrix are just joined together, not operated

mat.trans(a): Obtain the matrix transpose
    Args: matrix a

mat.adj(a): Calculate the adjoint of the matrix
    Args: matrix a

mat.inv(a): Calculate the matrix inverse
    Args: matrix a