PATH:
home
/
lab2454c
/
aficb.com
/
vendor
/
phpoffice
/
phpspreadsheet
/
src
/
PhpSpreadsheet
/
Calculation
/
Statistical
<?php namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical; use PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled; use PhpOffice\PhpSpreadsheet\Calculation\Exception; use PhpOffice\PhpSpreadsheet\Calculation\Functions; class Standardize extends StatisticalValidations { use ArrayEnabled; /** * STANDARDIZE. * * Returns a normalized value from a distribution characterized by mean and standard_dev. * * @param array|float $value Value to normalize * Or can be an array of values * @param array|float $mean Mean Value * Or can be an array of values * @param array|float $stdDev Standard Deviation * Or can be an array of values * * @return array|float|string Standardized value, or a string containing an error * If an array of numbers is passed as an argument, then the returned result will also be an array * with the same dimensions */ public static function execute($value, $mean, $stdDev) { if (is_array($value) || is_array($mean) || is_array($stdDev)) { return self::evaluateArrayArguments([self::class, __FUNCTION__], $value, $mean, $stdDev); } try { $value = self::validateFloat($value); $mean = self::validateFloat($mean); $stdDev = self::validateFloat($stdDev); } catch (Exception $e) { return $e->getMessage(); } if ($stdDev <= 0) { return Functions::NAN(); } return ($value - $mean) / $stdDev; } }
[+]
Distributions
[-] Averages.php
[edit]
[-] MaxMinBase.php
[edit]
[-] StandardDeviations.php
[edit]
[-] Minimum.php
[edit]
[-] Conditional.php
[edit]
[+]
..
[-] Size.php
[edit]
[-] Deviations.php
[edit]
[-] Trends.php
[edit]
[-] Percentiles.php
[edit]
[-] AggregateBase.php
[edit]
[-] Standardize.php
[edit]
[-] Maximum.php
[edit]
[+]
Averages
[-] Confidence.php
[edit]
[-] StatisticalValidations.php
[edit]
[-] Permutations.php
[edit]
[-] Variances.php
[edit]
[-] Counts.php
[edit]
[-] VarianceBase.php
[edit]