PHP code example of rindow / rindow-math-matrix

1. Go to this page and download the library: Download rindow/rindow-math-matrix library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rindow / rindow-math-matrix example snippets



// sample.php
rix\MatrixOperator;

$mo = new MatrixOperator();
$a = $mo->array([[1,2],[3,4]]);
$b = $mo->array([[2,3],[4,5]]);
$c = $mo->cross($a,$b);
echo $mo->toString($c,indent:true)."\n";
shell
$ php sample.php
[
 [10,13],
 [22,29]
]