Code covered by the BSD License  

Highlights from
ds

from ds by naser rezakhani
group contribution

DS.m
comp=2;
Ng=3;
t =277.59;

a(1)=2.0259e-011;
a(2)=1.1421e-010;
b(1)=2.6112e-010;
b(2)=5.4847e-010;

V=[1  0  0
   0  2/3  1/3];

A=[0  32.94*10^6  36.72*10^6
   32.94*10^6  0  74.81*10^6
   36.72*10^6  74.81*10^6  0 ];

B=[0  -35.00*10^6  108.4*10^6
   -35.00*10^6  0  165.7*10^6
   108.4*10^6  165.7*10^6  0 ];

for i=1:1:comp
        for j=1:1:comp

    sum=0;
    for k=1:1:Ng
        for l=1:1:Ng
             
            sum=sum + (V(i,k)-V(j,k))*(V(i,l)-V(j,l))*A(k,l)*(298.15/t)^((B(k,l)/A(k,l))-1);
            

        end
    end
k(i,j)=(((-1/2)*(sum))-((a(i)^0.5/b(i))-(a(j)^0.5/b(j)))^2)/(2*((a(i)*a(j))^0.5)/(b(i)*b(j)));
        end       
end

k

Contact us at files@mathworks.com