📅  最后修改于: 2022-03-11 14:45:13.919000             🧑  作者: Mango
function z = equilateral(x, y)
N = length(x);
z = zeros(N,1);
x1=x(1);
y1=x(2);
x2=y(1);
y2=y(2);
z(1)=(x1 + x2 + sqrt(3)*(y1-y2))/2;
z(2)=(y1 + y2 + sqrt(3)*(x2 - x1))/2;
end