Lease Square Minimization, lsqnonlin

I am using lsqnonlin for LSM problem. I have tried both ways trust region reflective and levenberg marquart (can be changed from options). They both provided the same result. What are the difference in these methods? PS: I have 4 equations with 3 unknowns.

回答 (1 件)

Svein Olav Hegerland
Svein Olav Hegerland 2018 年 4 月 18 日

0 投票

Hi! I know it a long time ago you posted this post, but can I have a look at your code :)? I am trilaterating using the lsqnonlin solver and would like to compare my approach to yours.

3 件のコメント

Rafa Z
Rafa Z 2018 年 4 月 19 日
check your FB;
Hussein Kwasme
Hussein Kwasme 2018 年 7 月 16 日
Hello, Just found this discussion, I'm trying to do trilateration of a point in a 2-D plane having 4 reference points (known positions and distances to my unknown point).
Is it possible to have the code? I can solve my system with SOLVE command if I have only 3 reference points (shown in picture), but I get no solution when I add the 4th reference point.
if true
BS=3
syms x1 y1 m
% assume(x1,'real')
% assume(y1,'real')
for i = 1:2:BS
syms x1 y1
%solving the equations
m(i,:) = (((x1-anchorLoc(2,1)).^2 + (y1-anchorLoc(2,2)).^2 - (distanceNoisy(2))^2)) - ...
(((x1-anchorLoc(i,1)).^2 + (y1-anchorLoc(i,2)).^2 - (distanceNoisy(i))^2));
end
syms x1 y1
[X1,Y1] = solve(m,x1,y1);
beacon_est(1,1)=double(X1);
beacon_est(1,2)=double(Y1);
end
Rafa Z
Rafa Z 2018 年 9 月 3 日
shoot me a message to rafaelsantos90@mail.ru; will share scripts I have.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

製品

質問済み:

2016 年 5 月 26 日

コメント済み:

2018 年 9 月 3 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by