Contents | Previous | Next | Subchapters |

Syntax |
`linlsq(` A`, ` b`, ` bound`)` |

See Also | nlsq , linlsqb |

Returns a vector

*x*

, that solves the problem

2

minimize | *A* *x* - *b* | with respect to *x*

The matrix *x*

, has the same type as

If more than one solution exists,
the solution of minimum norm is returned
(i.e., the value of *x*

that minimizes `|`*x*|

over the set of solutions).

The operation "`\`

" uses a
QR factorization to solve similar problems.
If the rank of `\`

" operator will generate an error
if you compute `A \ b`

.
The `linlsq`

function can solve such problems.
```
```

A = {1., 1.}

b = {1., 2.}

eps = 1e-7

linlsq(A, b, eps)

returns
```
```

1.5