# slash

(/) right division and feed back

## Description

Right division: `x=A/B` is the solution of `x*B=A`.

The slash (right division) and backslash (left division) operators are linked by the following equation: `B/A=(A'\B')'`.

In the case where A is square, the solution `x` can be computed either from LU factorization or from a linear least squares solver. If the condition number of A is smaller than 1/(10*%eps) (i.e. if A is well conditionned), the LU factorization with row pivoting is used. If not (i.e. if A is poorly conditionned), then X is the minimum-norm solution which minimizes `||A*X-B||` using a complete orthogonal factorization of A (i.e. X is the solution of a linear least squares problem).

`A./B` is the elementwise right division, i.e. the matrix with entries `A(i,j)/B(i,j)`. If `B` is scalar (1x1 matrix) this operation is the same as `A./B*ones(A)`. Same convention if `A` is a scalar.

Remark that `123./B` is interpreted as `(123.)/B`. In this cases dot is part of the number not of the operator.

System feed back. `S = G/.K` evaluates `S = G*(eye() + K*G)^(-1)` this operator avoid simplification problem.

Remark that `G/.5` is interpreted as `G/(.5)`. In such cases dot is part of the number, not of the operator.

Comment `//` comments a line i.e. lines which begin by `//` are ignored by the interpreter.

## Examples

    a=[3.,-24.,30.];
    B=[
       9.   -36.    30.
      -36.   192.  -180.
       30.  -180.   180.
    ];
    x=a/B
    x*B-a // close to zero

    a=4 / 2; // Should be 2
    a=2 ./ [2,4]; //     1.    0.5
    // Comments are good. They help to understand code

## See Also

- inv
- backslash
- comments

## History

5.4.1
The threshold level for conditioning in slash increased.