Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Convert MATLAB to Python Reddit

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
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #Convert #MATLAB #Python #Reddit
ADD COMMENT
Topic
Name
8+8 =