function An = Coef(n)
global rho_b vp vs omega a b

u_12r = @(r)nthargout(1,@depl, n,r);
u_12theta = @(r)nthargout(2, @depl, n,r);
u_3r = nthargout(3, @depl, n,a);
u_3theta = nthargout(4,@depl, n,a);
u_incr = nthargout(5, @depl, n,a);
u_inctheta = nthargout(6,@depl, n,a);
sigma_12r = @(r)nthargout(1, @sigma, n,r);
sigma_12theta = @(r)nthargout(2, @sigma, n,r);
sigma_3r = nthargout(3, @sigma , n, a);
sigma_3theta = nthargout(4, @sigma, n, a);
sigma_incr = nthargout(5, @sigma,n, a);
sigma_inrtheta = nthargout(6, @sigma, n, a);

Cn(1,:) = [u_12r(a), -u_3r];
Cn(2,:) = [u_12theta(a), -u_3theta];
Cn(3,:) = [sigma_12r(a), -sigma_3r];
Cn(4,:) = [sigma_12theta(a), -sigma_3theta];
Cn(5,:) = [sigma_12r(b) - 1i*omega*rho_b*vp*u_12r(b), 0 ,0 ];
Cn(6,:) = [sigma_12theta(b) - 1i*omega*rho_b*vs*u_12theta(b), 0, 0];

Bn = [-u_incr ; -u_inctheta ; - sigma_incr ; -sigma_inrtheta ; 0 ;0];

An = Cn\Bn;

endfunction