indices on the right incompatible

1 回表示 (過去 30 日間)
Chinaemerem Valentine Nwobi
Chinaemerem Valentine Nwobi 2019 年 5 月 17 日
編集済み: madhan ravi 2019 年 5 月 17 日
% 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 件のコメント
Chinaemerem Valentine Nwobi
Chinaemerem Valentine Nwobi 2019 年 5 月 17 日
Not enough input arguments.
and i have all it needs to run
madhan ravi
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 ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by