?? plotpicture2.m
字號:
global demand;
global customer;
global depot;
v=[ 3 14 5
3 10 12
3 7 6
1 8 15
1 13 3
1 4 11
1 1 9
1 2 0];
l=[ 2 2 2 2 2 2 2 1];
z=zeros(depot,1);
for i=1:length(l)
z(v(i,1))=1;
x1(1)=demand(v(i,1)+customer,1)
y1(1)=demand(v(i,1)+customer,2)
k=2;
while k<=l(i)+1
x1(k)=demand(v(i,k),1)
y1(k)=demand(v(i,k),2)
k=k+1;
end
x1(l(i)+2)=demand(v(i,1)+customer,1)
y1(l(i)+2)=demand(v(i,1)+customer,2)
line(x1,y1);
clear x1;
clear y1;
end
z
for j=1:depot
% if z(j)==1
hold on
plot(demand(j+customer,1),demand(j+customer,2),'s');
%else
% hold on
% plot(demand(j+customer,1),demand(j+customer,2),'s');
end
end
for i=1:customer
hold on
plot(demand(i,1),demand(i,2),'*');
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -