0

I read about multilateration method and solving it using Least Square method. Assuming I have (m) points in 2-D, and their distances(the distances contain error), then I want to find the intersection point.

enter image description here

In (linear form) least square method the equations are:

Ax =b

ls equ

In Matlab when use:

x= A\b

or

x= lsqr(A,b)

It gives only one answer! does it give the best solution directly?

And how I can get all the solutions?

Thanks,

userInThisWorld
  • 1,361
  • 4
  • 18
  • 35
  • 1
    RTM: [`mldivide`](https://nl.mathworks.com/help/matlab/ref/mldivide.html) – Rody Oldenhuis Jan 05 '17 at 09:49
  • @RodyOldenhuis mldivide also work as previous mentioned functions (\ and lsqr) and gives one solution only – userInThisWorld Jan 05 '17 at 10:35
  • How many solutions do you expect then? And I pointed to that page of the MATLAB manual, because it contains this sentence: "*If `A` is a rectangular `m`-by-`n` matrix with `m` ~= `n`, and `B` is a matrix with `m` rows, then `A\B` returns a least-squares solution to the system of equations `A*x= B`.*" – Rody Oldenhuis Jan 05 '17 at 10:45
  • 1
    From a least squares operation, I expect 1 solution, namely a 2-element vector: the *slope* and *offset* best describing your data. – Rody Oldenhuis Jan 05 '17 at 10:47
  • Thanks, but what do you mean by slope and offset? I thought the answer of the lsqr is the best solution for the intersection point (i.e. x and y coordinate) – userInThisWorld Jan 05 '17 at 11:18
  • OK let's start over here. You have `m` distance measurements to `m` different but known locations (`xₙ` and `yₙ` for `n = 1..m`). And with those, you want to find your position, right? – Rody Oldenhuis Jan 05 '17 at 11:27
  • yes, but these distances not accurate (if accurate it will intersect all in one point with zero error) – userInThisWorld Jan 05 '17 at 11:30
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/132384/discussion-between-rody-oldenhuis-and-techno90). – Rody Oldenhuis Jan 05 '17 at 11:31
  • 2
    it gives not the best but the one that satisfies the `min |Ax - b|` over all `x` with respect to 2-norm. For all solutions you can add any vector in the nullspace of A (if there is any nontrivial element). – percusse Jan 05 '17 at 12:15

0 Answers0