MATLAB: Matlab Plotting Question: No graphs

MATLABplotting

1573185837(1).jpg
1573185869(1).png
Hello Everyone, I am trying to plot the below equilibrium curve by using the plot shown. However, my code does not work.
Is there anything that I missed? Thank you for your help! 🙂

Best Answer

Hi, Meowooo
Please try below code.
T1 = 70:90; A1 = 13.8858; B1 = 2788.51; C1 = 220.79;
T2 = 120:140; A2 = 14.0045; B2 = 3279.47; C2 = 213.20;
P = 101.33;
P1sat = exp(A1 - B1 ./ (T1 + C1));
P2sat = exp(A2 - B2 ./ (T2 + C2));
x1 = ((P - P2sat)./(P1sat-P2sat)); % / => ./
y1 = (P1sat/P).*x1; % * => .*
plot(x1, y1);
grid on
Related Question