load("traj.mat")
%pdp 1st bond(11.718,-3.7
%gdd 1st bond(6.86095,-3.8022)
%- pdp start(11.7233,-2.01054) end(10.0294,-3.70723)
%- gdd start(6.86115,-1.93593) end(5.16475,-4.26694)
pdpid_length = length(pdp_xcmd);
for idxi = 1 : pdpid_length
if pdp_xcmd(idxi)==11.7233 && pdp_zcmd(idxi)==-2.0105
pdpstart = idxi;
elseif pdp_xcmd(idxi)==10.0294 && pdp_zcmd(idxi)==-3.7072
pdpend = idxi;
end
end
mat文件中有两个向量(pdp_xcmd和pdp_zcmd),已知pdp start点(pdp_xcmd,pdp_zcmd)在向量中是相同的索引;
遇到的问题,为什么for循环中没有进入到if判断