divide() 공개 정적인 메소드

[x₁ / y₁, x₂ / y₂, ... ]
public static divide ( variadic $arrays ) : array
$arrays variadic Two or more arrays of numbers
리턴 array
예제 #1
0
 /**
  * Calculate the regression parameters by least squares on linearized data
  * x / y = x / V + K / V
  */
 public function calculate()
 {
     // Linearize the relationship by dividing x by y
     $y’ = Multi::divide($this->xs, $this->ys);
     // Perform Least Squares Fit
     $linear_parameters = $this->leastSquares($y’, $this->xs)->getColumn(0);
     $V = 1 / $linear_parameters[1];
     $K = $linear_parameters[0] * $V;
     $this->parameters = [$V, $K];
 }