% if abs(L-18)<0.1 && thetad(k)>0 && thetad(k)<16%第一二问
if L<=20 &&L>=16 && thetad(k)>0 && thetad(k)<16%第三问
disp('d'); numi(t)=i; LD(t)=Ld; numk(t)=k; BALL(t)=ball;
THETA(t)=thetad(k); Alphac(t)=alphac; H1(t)=h1;H2(t)=h2;
t=t+1; continue; end
% if thetad(k)<0
% L=L-ld*sind(thetad(k)); % if abs(L-18)<0.1 % disp('d'); % H1=h1;H2=h2; % break; % else
% continue; % end % end k=k+1; end
%------链环-------------------------
end end end end end
% plot(Td); % figure
% plot(thetad)
[thetasort,s]=sort(THETA); for j=1:length(s)
if Alphac(s(j))>85 H1best=H1(s(j))
37
H2best=H2(s(j))
Ballbest=BALL(s(j)) numk=numk(s(j)) num=numi(s(j)) ld=LD(s(j)) break; end end
plot(xd,yd)
38