Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
I am using the element names as symbolic variables to make the answer look nice. Why will it not perform the function when my equivalence ratio is more than one?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
if phi > 1
N_rO2 = a/phi;
N_rN2 = a*3.76/phi;
N_CO2 = x/phi;
N_H2O = y/(2*phi);
N_pO2 = 0;
N_pN2 = N_rN2;
N_pfuel = (1 - (1/phi))*fuel;
end
fuel + N_rO2*O2 + N_rN2*N2
disp('<=>')
(N_CO2*CO2)+(N_H2O*H2O)+(N_pO2*O2)+(N_pN2*N2)+(N_pfuel*fuel)
Error using *
Inner matrix dimensions must agree.
Error in ReactantMolFractions (line 59)
(N_CO2*CO2)+(N_H2O*H2O)+(N_pO2*O2)+(N_pN2*N2)+(N_pfuel*fuel)
2 comentarios
Stephen23
el 17 de Sept. de 2018
Editada: Stephen23
el 17 de Sept. de 2018
@Elizabeth Browne: I suspect that you need to learn about the differences between matrix operations and array operations:
If any of phi, a, x, y, etc. are non-scalar, then probably none of your * and / operations are actually doing what you think they are doing. But because your code contains no comments or explanation, this is just a guess.
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!