Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How can I calculate the area between this two curves from McCabe-Thiele c

2 vues (au cours des 30 derniers jours)
Katya Claros
Katya Claros le 27 Mar 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
this is the code. but I want to be able to find the area between the orange curve and the yellow curve
close all; clc;
%Plot equlibrium line
x_TXY = [0 0.012 0.02 0.026 0.033 0.036 0.053 0.074 0.087 0.108 0.129 0.164 0.191 0.268 0.294 0.352 0.402 0.454 0.502 0.563 0.624 0.717 0.79 0.843 0.857 0.938 1];
y_TXY = [0 0.068 0.121 0.159 0.188 0.215 0.275 0.356 0.395 0.44 0.488 0.537 0.572 0.648 0.666 0.704 0.734 0.76 0.785 0.812 0.835 0.877 0.91 0.93 0.939 0.971 1];
p1=398.76;
p2=-1958.7;
p3=4051.3;
p4=-4535.2;
p5=2893.3;
p6=-948.69;
p7=38.738;
p8=90.336;
p9=-35.774; p10=6.9969; p11=-0.003658;
x=x_TXY;
eq_fit=p1.*x.^10+p2.*x.^9.+p3.*x.^8+p4.*x.^7+p5.*x.^6.+p6.*x.^5+p7.*x.^4+p8.*x.^3+p9.*x.^2+p10.*x+p11;
plot (x_TXY, y_TXY)
hold on
plot (x_TXY, eq_fit)
%Plot 45 deg line
x_45 = (0:0.1:1);
y_45 = (0:0.1:1);
plot (x_45,y_45)
%Select x_D value
x_D=[0.75];
%Draw Op-line from x_D
L=4; D=2; R=L/D;
m=R/(R+1); y_int=x_D/(R+1);
y_op=m*x_D+y_int;
plot([0,x_D], [y_int, y_op])
%Draw 3 steps from x_D to find x_W
%Vertical line 1
x_1= 0.434;
x_2= x_D;
y_1= x_D;
y_2 = y_1;
plot([x_1, x_2], [y_1, y_2])
%Horizantal line 1
xline(x_1)
% %Vertical line 2
x_3=0.1657999975;
x_4=0.434;
y_3=0.53933333;
y_4=0.53933333;
plot([x_3, x_4], [y_3, y_4])
%Horizantal line 2
xline(x_1)
% %Vertical line 3
x_5=0.0755110065;
x_6=0.1657999975;
y_5=0.360533302;
y_6=0.360533302;
plot([x_5, x_6], [y_5, y_6])
%Horizantal line 3
xline(x_5)

Réponses (1)

Navya Seelam
Navya Seelam le 30 Mar 2020

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by