constr=[constr,-pi<=delta(2:B,1:T,1:H)<=pi];
for t=1:T for h=1:H for i=1:B
if (i>1) constr=[constr,-pi<=delta(i,t,h)<=pi]; end
end
end
end
B=10;T=20;H=30;delta=sdpvar(B,T,H);
ticconstr=-pi<=delta(2:B,1:T,1:H)<=pi;toc
constr=[];tic
for t=1:T for h=1:H for i=1:B if (i>1) constr=[constr,-pi<=delta(i,t,h)<=pi]; end end endend
toc
for b=1:size(zz,1)constr=[constr,pij(zz(b,1),zz(b,2),:,:)==0];end
pij(zz,:,:)
pij(zz(:,1),zz(:,2),:,:)
pp=zeros(B,B,T,H);k=1;for z=1:size(zz,1)
for t=1:T for h=1:H
index(k)=sub2ind(size(pp),zz(z,1),zz(z,2),t,h);k=k+1; end endend