关于相平衡的问题
function y=Profit(v)tem=linspace(300,400,11);
con=tem.^4*7.25524475523*10^(-9)-tem.^3*1.0316045066*10^(-5)+tem.^2*5.42210664335*10^(-3)-tem.*1.24286734654+1.05099508158*10^2;
DEsel=tem.^3*5.24475524476*10^(-9)-tem.^2*5.71678321678*10^(-6)+tem.*1.97132867133*10^(-3)-2.08454545455*10^(-1);
PYsel=tem.*0.001-0.22;
%for R401%;
F1IP=100*0.88;
F1WA=100-F1IP;
F2IP=F1IP-F1IP*con;
F2DE=con.*DEsel.*(F1IP./(1+DEsel+PYsel));
F2PY=con.*PYsel.*(F1IP./(1+DEsel+PYsel));
F2AC=F1IP*con.*(1./(1+DEsel+PYsel));
F2WA=F2DE+F2PY;
F2HY=F2AC;
F3WA=F2AC*0.01;
sumzi=F2IP+F2DE+F2AC+F3WA+F1WA+F2WA;
%for T-401%
global z
IPzi=F2IP./sumzi
DEzi=F2DE./sumzi
ACzi=F2AC./sumzi
WAzi=(F3WA+F1WA+F2WA)./sumzi
sumflare=F2PY+F2HY;
yPY=F2PY./sumflare;
yHY=F2HY./sumflare;
z=
Ai=;
Bi=;
Ci=[-53.54 -43.15-46.13 -45.09];
Patm=380;
T=linspace(60,70,11);
Tk=T+273.15;
for i=1:4
Ki(i)=exp(Ai(i)-Bi(i)./(Ci(i)+Tk))/Patm;
end
Ki(4)=exp(Ai(4)-Bi(4)./(Ci(4)+Tk))/Patm*760/101.3
sum1=0.;
for i=1:4
num=z(i).*(Ki(i)-1);
denom=1+(Ki(i)-1)*v;
sum1=sum1+num./denom;
end
y=sum1;
上述的函数是求 v的,Matlab显示的错误如下
???In an assignmentA(I) = B, the number of elements in B and
I must be the same.
Error in ==> Profit at 34
Ki(i)=exp(Ai(i)-Bi(i)./(Ci(i)+Tk))/Patm;
求高手帮帮啊,我在线等 常见的程序出错问题整理 (eight), 13F
http://forum.vibunion.com/forum/thread-46001-1-1.html
页:
[1]