How do I get the solutions to this system of eqns
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
x = [ 1 1 1; -3 3+5i 3-5i; 9 34+30i 34-30i];
y = [28/3;15/2;9];
2 Commenti
Les Beckham
il 17 Ott 2023
x = [ 1 1 1; -3 3+5i 3-5i; 9 34+30i 34-30i]
y = [28/3;15/2;9]
That is not a system of equations, it is two assignment statements that create a complex matrix and a real column vector. Please specify the actual equation that you wish to solve.
Risposte (2)
Sulaymon Eshkabilov
il 17 Ott 2023
Simply use \, linsolve(), inv(), etc. E.g.:
x = [ 1 1 1; -3 3+5i 3-5i; 9 34+30i 34-30i];
y = [28/3;15/2;9];
Solution1 = linsolve(x,y)
Solution2 = x\y
Solution3 = inv(x)*
0 Commenti
Sulaymon Eshkabilov
il 17 Ott 2023
You may also try lsqr(), rref(), svd(), and solve() with syms. E.g.:
x = [ 1 1 1; -3 3+5i 3-5i; 9 34+30i 34-30i];
y = [28/3;15/2;9];
Solution4 = lsqr(x,y)
Sol = rref([x,y]);
Solution5 = Sol(:,end)
% svd()
[U,S,V]=svd(x);
Solution6 = V*inv(S)*U'*y
% solve() with syms --> NOT recommended though
syms x y z
A = [ 1 1 1; -3 3+5i 3-5i; 9 34+30i 34-30i];
b = [28/3;15/2;9];
Eqn = A*[x;y;z]==b;
Sol = solve(Eqn)
Solution7 = double([Sol.x; Sol.y; Sol.z])
0 Commenti
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!