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')

采纳的回答

Matt J
Matt J 2020-11-11
编辑:Matt J 2020-11-11
T1=fzero(@GRdiff,[350,400])
T1 = 377.5263
T2=fzero(@GRdiff,[400,450])
T2 = 418.3883
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 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by