Ornstein Zernike Equation
2016-08-23
0 0 0
no vote
Other
Earn points
function fm=oz(x)
%OZ FM=OZ(X) is the nonlinear residual for the
% Ornstein-Zernike equations.
%
% Evaluate the nonlinearity as a sum of the substitution
% and compact parts.
%
fm=ozsub(x)+ozinteg(x);
%
% This is the substitution part.
%
function km=ozsub(x)
global L U rho
n=length(x); n2=n/2; h=x(1:n2); c=x(n2+1:n);
nl=U.*exp(h-c);
mup=h+1- nl;
mdown=c+1-nl;
km=[mup',mdown']';
%
% This is the compact part of the nonlinearity. The upper
% component is zero, the lower is rho*L*c*h.
%
% rho and L are scalars for this problem
%
function km=ozinteg(x)
global L U rho
L3=L*L*L*rho;
n=length(x); n2=n/2; h=x(1:n2); c=x(n2+1:n);
kd= L3*convk(c,h);
kd(1)=2*kd(2)-kd(3);
kd(n2)=2*kd(n2-1)-kd(n2-2);
kup=zeros(n2,1);
km=[kup',kd']';
%
% Discrete conv
%OZ FM=OZ(X) is the nonlinear residual for the
% Ornstein-Zernike equations.
%
% Evaluate the nonlinearity as a sum of the substitution
% and compact parts.
%
fm=ozsub(x)+ozinteg(x);
%
% This is the substitution part.
%
function km=ozsub(x)
global L U rho
n=length(x); n2=n/2; h=x(1:n2); c=x(n2+1:n);
nl=U.*exp(h-c);
mup=h+1- nl;
mdown=c+1-nl;
km=[mup',mdown']';
%
% This is the compact part of the nonlinearity. The upper
% component is zero, the lower is rho*L*c*h.
%
% rho and L are scalars for this problem
%
function km=ozinteg(x)
global L U rho
L3=L*L*L*rho;
n=length(x); n2=n/2; h=x(1:n2); c=x(n2+1:n);
kd= L3*convk(c,h);
kd(1)=2*kd(2)-kd(3);
kd(n2)=2*kd(n2-1)-kd(n2-2);
kup=zeros(n2,1);
km=[kup',kd']';
%
% Discrete conv
matlab
方程
奥恩
斯坦泽
尼克
Related Source Codes
GMSK Linear Receiver
0
0
no vote
NSGA-II algorithm
0
0
no vote
NSGA-III multi-objective optimization algorithm
0
0
no vote
Compressed sensing example
0
0
no vote
CFAR detector example
0
0
no vote
No comment