Can anyone Solve the Error.
Ältere Kommentare anzeigen
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);
for i=1:0.05:2
syms x2 ps1 ps2 p y1 y2
x1=i-1;
x2=1-x1;
k=round(((i-1+0.05)/0.05),0)
ps1 = exp (16.59158-(3643.31/(t-33.424)));
ps2 = exp (14.25326-(2665.54/(t-53.424)));
eqn1= p-((x1*ps1)+(x2*ps2))==0;
p(1,k)= vpa(solve(eqn1))
eqn2= y1-((x1*ps1)/p(1,k))==0;
y1(1,k)= vpa(solve(eqn2))
eqn3= y2-((x2*ps2)/p(1,k))==0;
y2(1,k)= vpa(solve(eqn3))
end
plot(y1,p)
Command Window:
k =
21
p =
[ p, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44.510902949867883648948918562382]
y1 =
[ y1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0]
y2 =
[ y2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Error using plot
Non-numeric data is not supported in 'Line'
Error in Sample13 (line 22)
plot(y1,y2)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Conversion finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


