switch u(i)
case 1
fee=c*sum(b)*sum(h);
a(1)=[];
case 2
fee=c*sum(b)*sum(h);
a0=length(a)
a(a0)=[];
case 3
fee=c*sum(a)*sum(h);
b(1)=[];
case 4
fee=c*sum(a)*sum(h);
b0=length(b)
b(b0)=[];
case 5
fee=r*c*sum(a)*sum(b);
h(1)=[];
case 6
fee=r*c*sum(a)*sum(b);
h0=length(h)
h(h0)=[];
end
fee1=fee1+fee;
end
Fee=[Fee,fee1];
u(6)=[];%置空u的第六个元素
end
u(5)=[];
end
u(4)=[];
end
u(3)=[];
end
u(2)=[];
end
Feemin=min(Fee)</P>