资 源 简 介
function [circle,long]=modifycircle(c1,L)
global a
flag=1;
while flag>0
flag=0;
for m=1:L-3
for n=m+2:L-1
if a(c1(m),c1(n))+a(c1(m+1),c1(n+1))<...
a(c1(m),c1(m+1))+a(c1(n),c1(n+1))
flag=1;
c1(m+1:n)=c1(n:-1:m+1);
end
end
end
end
long=a(c1(1),c1(L));
for i=1:L-1
long=long+a(c1(i),c1(i+1));
end
circle=c1;
文 件 列 表
第3讲MATLAB源程序
liti1.m
liti10.m
liti11.m
liti12.m
liti13.m
liti14.m
liti15.m
liti16.m
liti17.m
liti18.m
liti19.m
liti2.m
liti20.m
liti21.m
liti22.m
liti23.m
liti24.m
liti25.m
liti26.m
liti27.m
liti28.m
liti29.m
liti3.m
liti30.m
liti31.m
liti32.m
liti33.m
liti34.m
liti35.m
liti36.m
liti37.m
liti38.m
liti4.m
liti40.m
liti41.m
liti42.m
liti43.m
liti5.m
liti6.m
liti7.m
liti8.m
liti9.m
myfun1.m
shanqu.m