indices on the right incompatible
2 次查看(过去 30 天)
显示 更早的评论
% am trying to run this my program with the function script and the input
% data given below. please have a look to know what am doing wrong
%%
function[PB,Ybub]=PB_VLE_NRTL(x,C,T,BIP)
% this is a function that calculates the bubble point using the wilson
% activity coeefficient model.
c=length(x);
for i=1:c
Psi=exp((C(i,1))+(C(i,2)/T)+(C(i,3)*log(T))+(C(i,4)*T^C(i,5)));
[gamma,~]=ACTIVITY_NRTL(BIP,alpha,T,x);
PB=sum(Psi.*x*gamma);
Ybub=Psi.*gamma/PB;
end
%% problem 2
% in order to determine the state of aggregation of the system
T=353.15;
P=101325;
i=1:2;
x=[0.5 0.5];
BIP=[196.250 386.133];
C(i)=[88.134 -8498.6 -9.0766 8.330e18 6];
C(i)=[153.23 -10055 -19.488 1.6426e5 2];
3 个评论
madhan ravi
2019-5-17
编辑:madhan ravi
2019-5-17
Probably you’re not aware of how to call a function.
Google : How to a call a function? MATLAB
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!