How to find the points where two lines cross?
1 次查看(过去 30 天)
显示 更早的评论
I need help finding the intersection of the two functions from this graph. I would like to have markers and have the command window tell me what the tmeprature value is at each point
T = [310:1:450];
v = 1;
V = 10;
dHrxn = -80000;
UA = 3600;
kf0 = 1;
kc0 = 100;
T0 = 400;
ER = 20000;
CpA = 40;
kf = exp(-20000*(1./T-1/400));
kc = 100*exp((80000/1.987)*(1./T-1/400));
x = 1./(v./(V.*kf)+1+(1./kc));
R = 400*(T-310);
G = x*-dHrxn;
figure
hold all
plot(T,R)
plot(T,G)
legend('R(T)','G(T)')
xlabel('Temperature (K)')
ylabel('G(T) and R(T) (cal/mol)')
title('G(T) and R(T) vs. T')
0 个评论
采纳的回答
Matt J
2020-11-11
编辑:Matt J
2020-11-11
T1=fzero(@GRdiff,[350,400])
T2=fzero(@GRdiff,[400,450])
function out=GRdiff(T)
v = 1;
V = 10;
dHrxn = -80000;
UA = 3600;
kf0 = 1;
kc0 = 100;
T0 = 400;
ER = 20000;
CpA = 40;
kf = exp(-20000*(1./T-1/400));
kc = 100*exp((80000/1.987)*(1./T-1/400));
x = 1./(v./(V.*kf)+1+(1./kc));
R = 400*(T-310);
G = x*-dHrxn;
out=R-G;
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!