# File: cmd.php

 Recommend this page to a friend! ReTweet
 Classes of Ricardo Gamba > Matrix algebra > cmd.php > Download
File: cmd.php Auxiliary script text/plain Command line exe Matrix algebra Perform operations with matrices By Ricardo Gamba 6 years ago 1,720 bytes

## Contents

 ``` ',\$cmd); \$cmd=str_replace("m.",'\$Mat->',\$cmd); \$cmd=str_replace("help",'echo \$help',\$cmd); \$cmd=str_replace("autor",'echo \$author',\$cmd); \$cmd=str_replace("print",'echo',\$cmd); \$author=' >> Created by Ricardo Gamba, 2008 '; \$help=' Commands ------------------------- 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 '; eval(\$cmd); ```

 Advertise on this site Site map Newsletter Statistics Site tips Privacy policy Contact