dev-master
9999999-dev https://github.com/royopa/mat-lab-phpSome Math operations on PHP with MatLab syntaxis.
MIT
The Requires
- php >=5.3.0
- malenki/math dev-master
The Development Requires
helpers math utils multibyte utf matlab
Some Math operations on PHP with MatLab syntaxis.
http://royopa.github.io/mat-lab-php, (*1)
Some Math operations on PHP with MatLab syntaxis., (*2)
If you're using Composer to manage dependencies, you can include the following in your composer.json file:, (*4)
{ "require": { "royopa/mat-lab-php": "dev-master" } }
or, (*5)
composer require royopa/mat-lab-php
Then, after running composer update
or php composer.phar update
, you can
load the class using Composer's autoloading:, (*6)
require 'vendor/autoload.php';
Otherwise, you can simply require the file directly:, (*7)
require_once 'path/to/MatLabPHP/src/MatLabPHP.php';
And in either case, I'd suggest using an alias., (*8)
use MatLabPHP\MatLabPHP as M;
$matLabPHP->stringToVector(string $str);
$matLabPHP = new MatLabPHP(); $matLabPHP->stringToVector("[3 1 2; 5 4 7; 6 9 7]"); //array( 0 => array( 0 => '3', 1 => '1', 2 => '2' ), 1 => array( 0 => '5', 1 => '4', 2 => '7' ), 2 => array( 0 => '6', 1 => '9', 2 => '7' ) );
$matLabPHP->eye($cols, $rows = 'eq');
$matLabPHP->zeros($cols, $rows = 'eq');
$matLabPHP->length($vector, $ret = 0);
$matLabPHP->sum($sumA, $sumB);
$matLabPHP->mean($array);
$matLabPHP->stddev(array $a, $isSample = false);
$matLabPHP->variance($a, $isSample);
$matLabPHP->covariance(array $x_values, array $y_values);
$matLabPHP->correlation(array $x_values, array $y_values, $isSample = false);
From the project directory, tests can be ran using:, (*9)
./vendor/bin/phpunit
Some Math operations on PHP with MatLab syntaxis.
MIT
helpers math utils multibyte utf matlab