How to pick an answer from solver for further calculations
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi there!
I would be appreciated if someone could help me about following codes.
syms Xi
%Feed Stoichiometry
yCO = 0.15;
yCO2 = 0.1;
yH2 = 0.45;
yH2O = 0.30;
%Equilibrium
eqn = ((yCO2 + Xi) * (yH2 + Xi) / (yCO - Xi) * (yH2O - Xi));
S = solve(eqn - K == 0, Xi)
Xi = vpa(S)
Here, I get 3 different answers and I would like to pick the one between 0 and 1 (for any value of K) to do further calculations. For K = 1.3440e+04, answer values are below.
Xi =
0.1499983259199154580821882262029
115.73248002820162922028599235038
-116.13247835412154467836818057659
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur General Applications 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!