problem with matrix is singular

I was trying to make a loop to calculate updated position of user , and I keep getting "Matrix is singular"

回答 (1 件)

Torsten
Torsten 2023 年 2 月 2 日
移動済み: Torsten 2023 年 2 月 2 日

0 投票

I think you forgot to close the k-loop before the definition of H.
What is the matrix A ? It's not defined in your code.

11 件のコメント

Dark
Dark 2023 年 2 月 2 日
It's a comment
Dark
Dark 2023 年 2 月 2 日
I closed the loop now , you were right.
But The problem remains ( Waring ) in
delta_x=(inv(H)).*delta_R_;
And G=inv(H'.*H)
Torsten
Torsten 2023 年 2 月 2 日
Q = inv(A'*A)
is a comment ?
Dark
Dark 2023 年 2 月 2 日
I removed it It's the same as G=inv(H'.*H) So I turn it to a comment
Dark
Dark 2023 年 2 月 2 日
When I put the red stop on "end" it gives values, as I press continue, the Waring "matrix is singular " appears .
Torsten
Torsten 2023 年 2 月 2 日
Could you include your code properly ?
Dark
Dark 2023 年 2 月 2 日
編集済み: Dark 2023 年 2 月 2 日
You can download the text file " gps pos.txt" that I adjusted it clear and organized more.
Torsten
Torsten 2023 年 2 月 2 日
編集済み: Torsten 2023 年 2 月 2 日
There are no adjustments in the file compared to the first version.
But as I already said: The k-loop should be closed before the definition of H.
And the value of "err" is never updated within the while loop. So it will run forever.
Dark
Dark 2023 年 2 月 2 日
Alright , yes err . Thank you. (Here is the file attached).
Dark
Dark 2023 年 2 月 2 日
Yes I found how to update the erreur , what remains is some organization. Thank you so much man
Dark
Dark 2023 年 2 月 5 日
編集済み: Dark 2023 年 2 月 5 日
Hello sir, this my final code, if you could make review , I couldn't update position x=x+delta_x in for loop.

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

カテゴリ

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

質問済み:

2023 年 2 月 2 日

編集済み:

2023 年 2 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by