Jul-24-2020, 09:04 AM
(This post was last modified: Jul-24-2020, 09:04 AM by cokhuatlanyeuthuongconhetmuc.)
Hello everyone, I am a newbie at Python. I want to "translate" my code in MATLAB into Python but meet a lot of problems.
For example, this is my code in MATLAB: To create a circle
alpha = 0:2*pi/10000:2*pi;
R = 100000;
for i = 1:length(alpha)
x(i) = R*cos(alpha(i))
y(i) = R*sin(alpha(i))
end
plot(x,y,'r')
Can anyone else help me do it in Python please? Thank you very much.
For example, this is my code in MATLAB: To create a circle
alpha = 0:2*pi/10000:2*pi;
R = 100000;
for i = 1:length(alpha)
x(i) = R*cos(alpha(i))
y(i) = R*sin(alpha(i))
end
plot(x,y,'r')
Can anyone else help me do it in Python please? Thank you very much.