Azzera filtri
Azzera filtri

System of equations giving empty solution

1 visualizzazione (ultimi 30 giorni)
MaxFrost
MaxFrost il 10 Nov 2018
Risposto: Ashutosh Prasad il 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 Commento
Bruno Luong
Bruno Luong il 10 Nov 2018
but there exists non-zero solution to this problem
Sorry but I trust more in MATLAB than you.

Accedi per commentare.

Risposte (1)

Ashutosh Prasad
Ashutosh Prasad il 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