Filter löschen
Filter löschen

System of equations giving empty solution

1 Ansicht (letzte 30 Tage)
MaxFrost
MaxFrost am 10 Nov. 2018
Beantwortet: Ashutosh Prasad am 13 Nov. 2018
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 Kommentar
Bruno Luong
Bruno Luong am 10 Nov. 2018
but there exists non-zero solution to this problem
Sorry but I trust more in MATLAB than you.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Ashutosh Prasad
Ashutosh Prasad am 13 Nov. 2018
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

Community Treasure Hunt

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

Start Hunting!

Translated by