Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Can Anyone Solve this error?

1 visualizzazione (ultimi 30 giorni)
Ahmed Saleem
Ahmed Saleem il 31 Dic 2020
Chiuso: John D'Errico il 31 Dic 2020
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'),

Risposte (0)

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by