用eq5=(C.*(a1.*asyT1(1,i)+b1-t11)).^2+(dA11(i)).^2-2.*dA11(i).*C.*(a1.*asyT1(1,i)+b1-t11).*ag(1,i);
eq6=(C.*(a1.*asyT1(2,i)+b1-t12)).^2+di(i).^2-2.*di(i).*C.*(a1.*asyT1(2,i)+b1-t12).*ag(2,i);
eq7=(C.*(a1.*asyT1(2,i)+b1-t12)).^2+(dA12(i)).^2-2.*dA12(i).*C.*(a1.*asyT1(2,i)+b1-t12).*ag(3,i);
eq8=(C.*(a1.*asyT1(3,i)+b1-t13)).^2+di(i).^2-2.*di(i).*C.*(a1.*asyT1(3,i)+b1-t13).*ag(4,i);
[a1,b1]=solve(eq7-eq8,eq5-eq6,a1,b1);
为什么解出来会有三个根?
ä»é¢ä¸»çé®é¢æ¥çï¼ç¨solveå½æ°æ±è§£å¸¦åéæ°ç»å¼æ¹ç¨æ¯ä¸åéçï¼åºè¯¥éç¨for循ç¯è¯å¥å solveæ±è§£ãæ±è§£æ¹æ³å¦ä¸ï¼
for i=1:n
syms a1 b1
eq5=ããã
eq6=ããã
eq7=ããã
eq8=ããã
[a1,b1]=solve(eq7==eq8,eq5==eq6,a1,b1)
end