Error in line 21
Plz help me with this. Whenever I sign them arrays it gives me error but without array it doesnt. Im using arrays to plot it.
clc% Part a
% ps1=exp (16.59158-(3643.31/(t-33.424)))
% ps2=exp (14.25326-(2665.54/(t-53.424)))
% T = 318.15 K and x1 = 0.25
t=318.15;p=zeros(1,21);y1=zeros(1,21);y2=zeros(1,21);for i=1:0.05:2 syms x2 ps1 ps2 p y1 y2 x1=i-1; x2=1-x1; k=((i-1+0.05)/0.05); ps1 = exp (16.59158-(3643.31/(t-33.424))); ps2 = exp (14.25326-(2665.54/(t-53.424))); % eqn1= p== (x1*ps1)+(x2*ps2);
p(1,k)= double(solve(p== (x1*ps1)+(x2*ps2))); % eqn2= y1== (x1*ps1)/p;
y1(1,k)= double(solve(y1== (x1*ps1)/p(1,k))) % eqn3= y2== (x2*ps2)/p;
y2(1,k)= double(solve(y2== (x2*ps2)/p(1,k)))end
Best Answer