% programa 16.3, W.L.Luyben, pag. 578
% "RGA for the Ogunnaike and Ray column"
% modif. E.Quintero.M 17nov'98
%-------------------------------------------------------
clear
format short e
% process steady state gain data
kp=[0.66 -0.61 -0.0049
    1.11 -2.36 -0.012
   -34.68 46.2  0.87 ];
% set parameters for matlab function "inv"
n=3;
gint=inv(kp)';
% calculate each beta element of the RGA
for i=1:n
   for j=1:n
      beta(i,j)=kp(i,j)*gint(i,j);
   end
end
beta





