Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2009-12-07
年龄: 38
帖子: 2
声望力: 0 ![]() |
![]()
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=[IPzi;DEzi;ACzi;WAzi] Ai=[18.6929 16.3417 18.3036 14.3145]; Bi=[3640.20 2895.73 3816.44 2756.22]; 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 assignment A(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; 求高手帮帮啊,我在线等 |
![]() |
![]() |
![]() |
#2 |
初级会员
注册日期: 2009-12-07
年龄: 38
帖子: 2
声望力: 0 ![]() |
![]()
大虾们,求助啊,真的很急急
|
![]() |
![]() |