۱٫ % This program plot the T-xy @ x-y diagrams for mixtures that obey from Raoult’s law.
2. %———————————————————————————–
۳٫ clc
4. clear all
5.
6. A1=input(‘Enter value of A1: ‘);
7. B1=input(‘Enter value of B1: ‘);
8. C1=input(‘Enter value of C1: ‘);
9.
10. A2=input(‘Enter value of A2: ‘);
11. B2=input(‘Enter value of B2: ‘);
12. C2=input(‘Enter value of C2: ‘);
13.
14. P=input(‘Enter value of pressure (mmHg): ‘);
15. T1=(B1/(A1-log10(P)))-C1;
16. T2=(B2/(A2-log10(P)))-C2;
17.
18. i=1;
19. for T=T1:.1:T2
20. TT(i)=T;
21. x=(P-10^(A2-B2/(T+C2)))/(10^(A1-B1/(T+C1))-10^(A2-B2/(T+C2)));
22. X(i)=x;
23. Y(i)=(x*10^(A1-(B1/(T+C1))))/P;
24. i=i+1;
25. end
26.
27. subplot(1,2,1)
28. plot(X,TT)
29. hold on
30. plot(Y,TT)
31. subplot(1,2,2)
32. plot(X,X)
33. hold on
34. plot(X,Y)