Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Can Anyone Solve this error?
조회 수: 1 (최근 30일)
이전 댓글 표시
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 y1 = 0.60
t=318.15;
p=zeros(1,21);
syms y2 ps1 ps2 p x1 x2
for i=1:0.05:2
y1=i-1;
y2=1-y1;
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= x1-((y1*P(1,k))/ps1)==0;
X1(1,k)= vpa(solve(eqn2))
eqn3= x2-((y2*P(1,k))/ps2)==0;
X2(1,k)= vpa(solve(eqn3))
end
y1=0:0.05:1;
plot(y1,P,X1,P,'.-'), legend('y1vsP', 'X1vsP'),xlabel('x1,y1'), ylabel('P'), title('P vs xy Graph'),
grid on
Command Window:
Error using plot
Non-numeric data is not supported in 'Line'
Error in Examplethirteenpointone_b (line 24)
plot(y1,P,X1,P,'.-'), legend('y1vsP', 'X1vsP'),xlabel('x1,y1'), ylabel('P'), title('P vs xy Graph'),
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!