필터 지우기
필터 지우기

Solving the following equation without taking inverse.

조회 수: 7 (최근 30일)
Parikshit Pareek
Parikshit Pareek 2017년 6월 21일
편집: Torsten 2022년 3월 25일
How to solve the following equation for calculating the D:
D=|inv(B)|∗|g|
here, B is a non-singular square matrix and g is a column vector of the length equal to the no of elements in the row of B. Modules is applied element-wise.
The solution of this without taking the inverse.
  댓글 수: 5
Walter Roberson
Walter Roberson 2022년 3월 25일
If it were not for the part of the then with singular matrices you would typically switch to using
What is the mathematical situation that leads you to want to have the part? And would using
D = abs(pinv(B)) * abs(g)
be acceptable for your situation?
Torsten
Torsten 2022년 3월 25일
편집: Torsten 2022년 3월 25일
I also didn't read the title of the contribution and thought:
Why not simply
D = abs(inv(B))*abs(g)
?

댓글을 달려면 로그인하십시오.

답변 (1개)

Chunru
Chunru 2022년 3월 25일
In matlab, you can solve the linear system by mldivide or \
"doc mldivide" for detailed description.
B= randn(4, 4)
B = 4×4
-0.0294 0.1957 -1.5414 -0.1266 0.2383 0.9828 0.2350 -0.1879 -0.2651 -0.7456 1.1097 0.4562 -0.7198 -0.0695 -0.1106 0.3846
g = randn(4, 1)
g = 4×1
0.3455 -0.6763 -2.1197 -1.6276
f = B \ g
f = 4×1
-3.8263 -2.1101 0.5352 -11.6193
B * f
ans = 4×1
0.3455 -0.6763 -2.1197 -1.6276
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 3월 25일
Notice in the original question,
Modules is applied element-wise
That is, the we see is absolute value of each element of g, and the is absolute value of each element of the inverse of B.
It is easy enough in your code to use B\abs(g) so there is no concern about the part. But the MATLAB \ operator does not take absolute value of the inverse, and there is no option to force it to.
This feels like a constrained least squares. I wonder if https://www.mathworks.com/help/matlab/ref/lsqnonneg.html can be used?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by