how can i solve this system on matlab?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Danny Farah
il 2 Ott 2021
Commentato: David Hill
il 2 Ott 2021
v+L =1
0.25=x1*L + y1*v
0.45 = x2*L +y2*v
0.30 = x3*L +y3*v
y1 = 2.7406*x1
y2 = 1.019*x2
y3 = 0.384*x3
x1+x2+x3=1
0 Commenti
Risposta accettata
Star Strider
il 2 Ott 2021
A different approach —
syms L v x1 x2 x3 y1 y2 y3
sys = [(v+L ==1)
(0.25==x1*L + y1*v)
(0.45 == x2*L +y2*v)
(0.30 == x3*L +y3*v)
(y1 == 2.7406*x1)
(y2 == 1.019*x2)
(y3 == 0.384*x3)
(x1+x2+x3==1)];
S = solve(sys)
T = struct2table(S)
T = varfun(@double, T)
.
0 Commenti
Più risposte (1)
David Hill
il 2 Ott 2021
syms v L x1 x2 x3 y1 y2 y3
eq1=v+L==1;
eq2=x1*L+y1*v==.25;
eq3=x2*L+y2*v==.45;
eq4=x3*L+y3*v==.30;
eq5=y1==2.7406*x1;
eq6=y2==1.019*x2;
eq7=y3==0.384*x3;
eq8=x1+x2+x3==1;
eqs=[eq1;eq2;eq3;eq4;eq5;eq6;eq7;eq8];
Sol=solve(eqs,[x1,x2,x3,y1,y2,y3,v,L]);
2 Commenti
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox 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!