필터 지우기
필터 지우기

Solve for an unknown matrix like solve() for dimension one

조회 수: 1 (최근 30일)
Kunle Olutomilayo
Kunle Olutomilayo 2019년 5월 28일
답변: Sulaymon Eshkabilov 2023년 10월 28일
syms d
eqn = d^2 - 9 == 0;
sol = solve(eqn, d)
The above is a method of 'solving' in dimension one. Solve() wouldn't work
May I know the option(s) of 'solving' in multi-dimensions, especially when we have diagonal matrices? An example is provided below:
eqn2 = D^(-3) + D^(-2)*W1 + W2 == zeros(n)
where D, W1 and W2 are diagonal matrices and n is the length of D. D is positive. If W1 and W2 are known, how can we solve for D?
PS: I checked the fminunc family but they for optimization (minimum solvers).
  댓글 수: 2
Ali
Ali 2023년 10월 28일
I'm having the same question
Torsten
Torsten 2023년 10월 28일
D = sym('D',[2 2]);
eqn = D*[1 4;-3 5] == [1 7;9 -12];
solve(eqn)
ans = struct with fields:
D1_1: 26/17 D1_2: 3/17 D2_1: 9/17 D2_2: -48/17

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

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 10월 28일
This exercise can be also simulated/solved by this way:
N=3; % Dimension
syms d [N N]
Eqn = d*randi(10, N)==randi(10,N);
SOL = solve(Eqn, d)
SOL = struct with fields:
d1_1: 7/6 d2_1: -1/28 d3_1: 59/84 d1_2: -1/6 d2_2: 37/84 d3_2: 19/84 d1_3: -1/2 d2_3: 1/4 d3_3: -1/4

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by