필터 지우기
필터 지우기

System of equations giving empty solution

조회 수: 1 (최근 30일)
MaxFrost
MaxFrost 2018년 11월 10일
답변: Ashutosh Prasad 2018년 11월 13일
How do I extract the values a, b, c, d after solving the system of equations using the following code? please note rxx(x, k) is a finite value using the command ap.a gives me Empty-sym: 0-by-1 but there exists non-zero solution to this problem. Can anyone help me please?
A = [rxx(x, 0) rxx(x, 1) rxx(x, 2) rxx(x, 3) rxx(x, 4);...
rxx(x, 1) rxx(x, 0) rxx(x, 1) rxx(x, 2) rxx(x, 3);...
rxx(x, 2) rxx(x, 1) rxx(x, 0) rxx(x, 1) rxx(x, 2);...
rxx(x, 3) rxx(x, 2) rxx(x, 1) rxx(x, 0) rxx(x, 1);...
rxx(x, 4) rxx(x, 3) rxx(x, 2) rxx(x, 1) rxx(x, 0);
];
B = zeros(1, 4);
B = [1 B]';
syms a b c d;
X = [1; a; b; c; d];
ap = solve(A*X==B);
  댓글 수: 1
Bruno Luong
Bruno Luong 2018년 11월 10일
but there exists non-zero solution to this problem
Sorry but I trust more in MATLAB than you.

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

답변 (1개)

Ashutosh Prasad
Ashutosh Prasad 2018년 11월 13일
To solve a system of linear equation using the function 'solve', you need to input each of the equations in the symbolic representation as an argument to ‘solve’. Alternatively, you can use the ‘linsolve’ function or ‘\’ operator to solve the system of linear equations in matrix form.
Follow this link to learn more: https://www.mathworks.com/help/symbolic/solve-a-system-of-linear-equations.html

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by