wliu06 发表于 2011-12-28 16:59
借花献佛了,这个程序为何报错啊?我检查好几遍了
X=[8124,6061,10130,20342,20561,4632;
12560,5230,42 ...
% Input matrix
X=[8124,6061,10130,20342,20561,4632;
12560,5230,4260,2310,1210,1790;
8420,4320,5820,12560,13510,12640;];
% Output matrix
Y=[3573,3510,4210,12680,21760,7920;
6970,5870,9120,21680,43250,21320;];
%extracts the number of inputs and outputs;
X=X';
Y=Y';
[n,m] = size(X);
[n,s] = size(Y);
epsilon=10^-10;
% Input oriented CCR model;
w = zeros(n,n+m+s+1);
% Objective function of the CCR model: min(0*lambda - epsilon*(s+ + s-) + theta);
f = [zeros(1,n) -epsilon*ones(1,s) -epsilon*ones(1,m) 1];
A=zeros(1,n+m+s+1);b=0;
lb=zeros(1,n+m+s+1);
lb(n+m+s+1)=-inf;
for j=1:n
Aeq = [Y', -eye(s,s), zeros(s,m+1);
-X', zeros(m,s), -eye(m,m), X(j,:)'];
beq = [Y(j,:)';zeros(m,1)];
w(j,:) = LINPROG(f,A,b,Aeq,beq,lb);
end
w
%%%%%
w =
1.0e+003 *
Columns 1 through 6
0.0000 0.0000 0.0000 0.0000 0.0001 0.0001
0.0000 0.0000 0.0000 0.0000 0.0002 0.0000
0.0000 0.0000 0.0000 0.0000 0.0002 0.0000
0.0000 0.0000 0.0000 0.0000 0.0006 0.0000
0.0000 0.0000 0.0000 0.0000 0.0010 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0010
Columns 7 through 12
0.0000 0.8007 0.0000 4.3303 0.0000 0.0004
0.0000 1.2121 0.0000 2.5946 0.0000 0.0005
0.3785 0.0000 0.6229 1.8301 0.0000 0.0005
0.0000 3.5227 0.7690 0.7428 0.0000 0.0006
0.0000 0.0000 0.0000 0.0000 0.0000 0.0010
0.0000 0.0000 0.0000 0.0000 0.0000 0.0010