Matlab returns answer with another variable z. What does this mean?

10 visualizaciones (últimos 30 días)
clayton holmes
clayton holmes el 9 de Mzo. de 2022
Respondida: Star Strider el 9 de Mzo. de 2022
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)

Respuestas (2)

Torsten
Torsten el 9 de Mzo. de 2022
Use
SolUsb = solve(eqn, Usb, 'MaxDegree', 3)
instead.

Star Strider
Star Strider el 9 de Mzo. de 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)
SolUsb = 
.

Categorías

Más información sobre Numbers and Precision en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by