Azzera filtri
Azzera filtri

How to find the points where two lines cross?

1 visualizzazione (ultimi 30 giorni)
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')

Risposta accettata

Matt J
Matt J il 11 Nov 2020
Modificato: Matt J il 11 Nov 2020
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

Più risposte (0)

Categorie

Scopri di più su Graph and Network Algorithms in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by