📜  将 MATLAB 转换为 Python Reddit - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:13.919000             🧑  作者: Mango

代码示例2
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