# visualizer/3.10.7/vendor/markbaker/matrix/examples/test.php

Visualizer – Tables &amp; Charts Manager with Built-in AI Generator, version 3.10.7. 20 lines.

- Page: https://pluginprobe.com/plugins/visualizer/3.10.7/code/vendor/markbaker/matrix/examples/test.php
- Raw: https://pluginprobe.com/plugins/visualizer/3.10.7/raw/vendor/markbaker/matrix/examples/test.php
- Modified: 2021-02-16T18:54:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/visualizer/3.10.7/code/vendor/markbaker/matrix/examples/test.php#L10-L20`.

```php
<?php

include __DIR__ . '/../vendor/autoload.php';

$grid1 = [
    [1, 3, 2],
    [2, 3, 1],
];

$grid2 = [
    [1, 6],
    [0, 1],
];

$matrix = new Matrix\Matrix($grid1);

$new = $matrix->directsum(new Matrix\Matrix($grid2));

var_dump($new);

```
