MATLAB: What’s the meaning of “w(m+1:m+s,i)”

MATLAB

My programming as follows:
X=[0.191 0.081 0.048 0.171 0.194 0.102 0.123 0.09;
0.163 0.129 0.054 0.116 0.136 0.136 0.143 0.122];
Y=[0.21 0.345 0.056 0.02 0.006 0.204 0.092 0.067;
0.177 0.118 0.057 0.174 0.094 0.131 0.152 0.097];
n=size(X',1);m=size(X,1);s=size(Y,1);
A=[-X' Y'];
b=zeros(n,1);
LB=zeros(m+s,1);
UB=[];
for i=1:n;
f=[zeros(1,m),Y(:,i)'];
Aeq=[X(:,i)',zeros(1,s)];
beq=1;
w(:,i)=linprog(-f,A,b,Aeq,beq,LB,UB);
E(i,i)=Y(:,i)'*w(m+1:m+s,i);
end
What's the meaning of "w(m+1:m+s,i)"?
Thanks a lot!

Best Answer

It addresses rows ‘m+1’ to ‘m+s’ in column ‘i’ of array ‘w’. Here, ‘m’ is defined as the row size (number of rows) of array ‘X’, and ‘s’ is defined as the row size of array ‘Y’.