how to define the range with variable
Show older comments
h_H2 = 0;
h_O2 = 0;
h_H2O = -241827;
s_H2 = 130.59;
s_O2 = 205.14;
s_H2O = 188.83;
T_ref = 298;
T = 293:1173;
n = 2;
F = 96487;
S = -163.25;
delH = (h_H2O + (143.05-58.04*(T.^0.25)+8.2751*(T.^0.5)-0.036989*T)*(T-T_ref)) - (1/2)*(h_H2 + (56.505-22222.6*(T.^(-0.75))+116500*(T.^(-1))-560700*(T.^(-1.5)))*(T-T_ref)) - (1/2)*(h_O2+(37.432+2.0102*(10.^(-5))*(T.^1.5)-178570*(T.^(-1.5))+2368800*(T.^(-2)))*(T-T_ref));
plot(T,delH)
it works if I use a value for T, but if I want to use the range of the T, it gives me error.
Accepted Answer
More Answers (1)
Torsten
on 1 Jun 2022
h_H2 = 0;
h_O2 = 0;
h_H2O = -241827;
s_H2 = 130.59;
s_O2 = 205.14;
s_H2O = 188.83;
T_ref = 298;
T = 293:1173;
n = 2;
F = 96487;
S = -163.25;
delH = (h_H2O + (143.05-58.04*(T.^0.25)+8.2751*(T.^0.5)-0.036989*T).*(T-T_ref)) - (1/2)*(h_H2 + (56.505-22222.6*(T.^(-0.75))+116500*(T.^(-1))-560700*(T.^(-1.5))).*(T-T_ref)) - (1/2)*(h_O2+(37.432+2.0102*(10.^(-5))*(T.^1.5)-178570*(T.^(-1.5))+2368800*(T.^(-2))).*(T-T_ref));
plot(T,delH)
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!