程序如下:
clear
X=[264806.95,3998,340244.15;
146823.04,4179,131544.52;
25401.48,929,7862.49;
215305.84,1674,279184.52;
417338.19,6656,240468.29;
475780.83,5210,164915.04;
163304.52,540,45263.70;
255716.76,1876,220412.48;
115885.38,869,108008.70;
232136.41,3325,158022.80;
161578.74,1392,127160.69;
];
Y=[20818.89,406987.07;
14479.76,174703.22;
904.18,12587.72;
3328.15,313829.38;
31047.86,327888.54;
21627.37,253739.73;
2956.68,62213.18;
1964.39,249315.82;
2165.19,117318.03;
9586.89,191067.60;
584.47,140788.65;
];
n=size(X', 1);
m=size(X,1);
s=size(Y,1);
epsilon=10^-10;
f=[zeros(1,n) -epsilon*ones(1,m+s) 1];
A=zeros(1,n+m+s+1);b=0;
LB=zeros(n+m+s+1,1);
UB=[];
LB(n+m+s+1)=-inf;
for i=1:n;
Aeq=[X eye(m) zeros(m,s) -X(:,i)
Y zeros(s,m) -eye(s) zeros(s,1)];
beq=[zeroS(m,1)
Y(:,i)];
w(:,i)=LINPROG(f,A,b,Aeq,beq,LB,UB);
end
w
Lambda=w(1:n,:)
s_minus=w(n+1:n+m,:)
s_plus=w(n+m+1:n+m+s,:)
theta=w(n+m+s+1,:)
运行出现:
Error in ==> CCR_DEA at 36
Aeq=[X eye(m) zeros(m,s) -X(:,i)