Matlab returns answer with another variable z. What does this mean?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
gamma = 1.4;
U2b = 1000;
U2a = 800;
T2a = 300;
A2a = sqrt(gamma*R*T2a);
syms gamma Usb A2a U2a U2b
eqn = (((gamma+1)*((Usb/A2a)^2))/((gamma-1)*((Usb/A2a)^2)+2)) - ((Usb-U2a)/(Usb-U2b))==0;
SolUsb = solve(eqn,Usb)
Returns
ans =
root(A2a^2*U2a - A2a^2*z - (z^2*(U2a + U2b - U2a*gamma + U2b*gamma))/2 + z^3, z, 1)
root(A2a^2*U2a - A2a^2*z - (z^2*(U2a + U2b - U2a*gamma + U2b*gamma))/2 + z^3, z, 2)
root(A2a^2*U2a - A2a^2*z - (z^2*(U2a + U2b - U2a*gamma + U2b*gamma))/2 + z^3, z, 3)
0 commentaires
Réponses (2)
Star Strider
le 9 Mar 2022
Put the syms declaration first and use vpasolve —
syms gamma Usb A2a U2a U2b
R = 8;
gamma = 1.4;
U2b = 1000;
U2a = 800;
T2a = 300;
A2a = sqrt(gamma*R*T2a);
eqn = (((gamma+1)*((Usb/A2a)^2))/((gamma-1)*((Usb/A2a)^2)+2)) - ((Usb-U2a)/(Usb-U2b))==0;
SolUsb = vpasolve(eqn,Usb)
.
0 commentaires
Voir également
Catégories
En savoir plus sur Numbers and Precision dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!